RAG & Hermes Agent: from 11% to 2% hallucinations across 1,200 internal documents
The questionCan we give our teams a reliable, sourced answer on any project, in under three seconds, from our existing documentation?
Yes, provided you enforce source citation and refuse to answer when no passage supports the answer. Reranking makes the difference, not the model.
DecisionAdopted. Integrated into Jarvis, our internal assistant, and used daily by the team.
- Status
- Conclusive
- Duration
- 4 weeks
- Team
- 2 developers, 1 architect
- Stack
- Hermes Agent
- pgvector
- BM25
- Cohere Rerank
- Claude
- MCP
Context
What we tested
- V1: vector search only (embeddings, pgvector), 5 passages sent to the model.
- V2: hybrid search, vectors + BM25 merged, to catch exact terms (table names, error codes, ticket references).
- V3: V2 plus reranking of the top 30 passages by a rerank model, 5 kept.
- V4: V3 plus a strict instruction: every statement must cite a passage, and the model must answer “I can’t find it” if no passage supports the answer.
- Hermes Agent skills: Hermes Agent is the open-source agent framework from Nous Research, and its skills are reusable capabilities. We wrote one per question type (procedure, decision, figure), which adapts the query and the answer format.
Results
- 0.61
- precision@5 with vector search only (V1)
- 0.72
- precision@5 with hybrid search (V2)
- 0.84
- precision@5 with rerank (V3)
- 2%
- hallucinations with mandatory citations (V4)
- Hybrid search fixes almost all failures on exact identifiers: an error code or a table name cannot be found through semantic similarity.
- Hermes Agent skills mainly improve the form: a procedure rendered as numbered steps, a decision with its rejected alternatives. Small precision gain, real usability gain.
- The median latency of 2.1 s is driven by generation, not by search (280 ms all included).
- Passage splitting: 400 tokens with an 80-token overlap gave the best results. Shorter loses context, longer dilutes the answer.
What we conclude
“The day the tool answered “I can’t find it” to a question I was sure I knew the answer to, I checked: the documentation didn’t exist. We wrote it.”
What’s next
- The V4 pipeline is integrated into Jarvis, our internal assistant, and now indexes the documentation of all our active projects, with reindexing every night.
- The “I can’t find it” questions are reported to the project managers every week: this has become our best detector of missing documentation.
- Next step: evaluate the same pipeline on a client’s documentation, with strict separation per project.