About Me
I'm an aspiring AI engineer focused on building LLM applications people can trust - answers grounded in real sources, with quality that's measured instead of assumed.
PortfolioThis is a static preview, not a live demo. RetrievIQ's backend needs real compute - an embedding model, a reranker, and two vector/keyword indexes - running at all times to answer questions. Free Docker hosting options I evaluated (Hugging Face Spaces, Google Cloud Run, Render, Oracle Cloud) were each ruled out for a specific reason (paid tiers, auto-expiring trials, insufficient free RAM, or requiring a credit card I don't have), so instead of a time-limited or unexpectedly billed deployment, this page shows the real system running locally via a recorded demo.
Answers with their sources still attached.
Static preview
This is a static preview with no live backend attached. Run the project on your machine to ask questions.
Clone the repo
git clone https://github.com/amritkn2244/retrieviq.git
Create and activate a virtual environment
Windows
python -m venv venv && venv\Scripts\activate
macOS/Linux
python -m venv venv && source venv/bin/activate
Install dependencies
pip install -r requirements.txt
Start the backend
uvicorn retrieviq.api.main:app --app-dir src --reload
Open frontend/index.html in your browser
Pipeline
Dense embeddings and BM25 each return their own shortlist.
Reciprocal Rank Fusion merges both lists, then a cross-encoder reorders the pool.
The model writes from those chunks only and tags each claim with a numbered source.
A judge model checks each citation against its chunk, then the answer gets one confidence score.
Refusing is a valid answer. The threshold is 0.60 by default.
About the project
RetrievIQ is a hybrid retrieval-augmented generation engine built from scratch, dense + BM25 sparse retrieval fused with RRF, optional cross-encoder reranking, grounded generation with inline citations, a second model that verifies every citation actually supports its claim, and a CI gate that blocks code changes if retrieval quality regresses.
“Ran without errors” is never the same claim as “works correctly”, this showed up repeatedly: a chunking strategy that completed silently while massively over-splitting its output, a generation script that returned empty answers with no exception, and a CI gate that had never actually been watched fail until it was deliberately broken.
Hybrid retrieval (dense + BM25 + RRF) beat reranking on this corpus, reranking isn’t a free win and needs to be measured, not assumed.
Independent evaluation metrics (faithfulness, correctness, relevance) catch different failure modes than one blended score ever could.
Retrieve from two independent rankings, fuse them by rank rather than by score, answer only from those chunks, then check every citation against the chunk it points at before anyone reads the answer.
Nothing on this page is a benchmark result. Every number shown with an answer is measured at
request time - retrieval scores, judge verdicts, confidence - and the eval numbers live in
eval/results/ in the repository.
The semantic chunker produced almost 2x more chunks than fixed or recursive chunking (1580 vs ~870) because its similarity threshold was too strict, closing a chunk after nearly every sentence. Caught by printing avg/min/max chunk size per strategy instead of trusting chunk counts alone.
Early generation calls came back empty. The model (a reasoning model) was spending its entire token budget on hidden reasoning tokens before it could write an answer. Fixed by raising max_tokens and giving the model room to think and answer.
A citation-verification bug: when the model wrote a claim ending in multiple citation markers back to back (e.g. “...sentence. [1][2]”), the claim-splitting logic isolated “[1][2]” as its own empty “claim,” which the judge model then scored as unsupported, silently tanking confidence scores on otherwise correct answers. Fixed the sentence splitter to not break before a citation marker group, and added a regression test.
The CI gate was never proven until it was deliberately broken: raised the recall threshold above the maximum possible value, pushed to a test branch, and watched GitHub Actions actually fail (red X), confirming the gate genuinely blocks bad changes rather than just looking correct on paper.
Build log
Each card opens its thread on X
About
I'm an aspiring AI engineer focused on building LLM applications people can trust - answers grounded in real sources, with quality that's measured instead of assumed.
Portfolio
Dr. Rajesh Kumar Tripathy