Optimizing Retrieval Precision

Learn about why the AI agent uses the wrong source when responding and how to fix it.

Why does the AI agent use the wrong document as its source?

When the AI agent or LLM give answers using the wrong document in your EbbotGPT knowledge, it's an AI hallucination type of issue.

Problem: The Language Model (LLM) provides an answer sourced from a document other than the one intended and both relevant documents was retrieved.

Cause: The LLM struggles to discern, based on the user's question or the content of the retrieved documents, which document contains the definitively "correct" answer. This often occurs when documents contain similar or overlapping information.

Potential solutions on optimizing retrieval precision

Document improvement: Enhance the target document's clarity and specificity. Make it easier for the LLM to identify it as the most relevant source for particular queries. This could involve:

  • Adding unique identifiers or key phrases.

  • Structuring information more clearly.

  • Ensuring the document directly answers common questions it's intended for.

Persona refinement: Modify the persona or instructions to guide its behavior when faced with ambiguous document relevance. For example, instruct the AI agent to:

  • "If multiple documents contain similar information, always present information from all relevant documents, noting their distinct sources."

  • "If uncertain about the primary source, state the source of the information provided."

Last updated

Was this helpful?