Bobster2002
12/27/2025, 7:09 PMAI Evy
12/27/2025, 7:09 PMAI Evy
12/27/2025, 7:09 PMOnly answer using the information in ## Related Knowledge Base Contexts.
If ## Related Knowledge Base Contexts is missing or does not contain relevant information, respond:
"There is no related information in knowledge base."
This instructs the agent to only use retrieved knowledge base content and explicitly state when information isn't available rather than hallucinating.
Additional tips from the community:
- The model you're using can affect accuracy—certain models have higher context windows (GPT 4.1 has ~1M tokens vs GPT 4o's 128K) [(2) ]()
- Consider splitting large documents into smaller, organized sections with specific names
- Make your system prompt concise and to the point, and properly label possible questions & answers in your knowledge base [(3) ]()
You can also configure kb_config parameters like top_k (number of results) and filter_score (relevance threshold) to tune retrieval behavior. [(2) ]()AI Evy
12/27/2025, 7:09 PMAI Evy
12/27/2025, 7:09 PMBobster2002
12/29/2025, 12:57 AMAI Evy
12/29/2025, 12:57 AM## Related Knowledge Base Contexts.
Key points:
- There's no need to change your prompt for retrieval to trigger—it happens automatically for every response generation when a knowledge base is linked to an agent.
- Retrieval latency is optimized for real-time use cases and should generally be under 100ms.
Configurable settings:
- **Chunks to retrieve**: Max number of chunks to retrieve (range 1-10, default: 3) .
- **Similarity Threshold**: Controls how strict matching is—higher values give fewer but more similar matches (default: 0.6) .
Best practices for better retrieval:
- Prefer .md (Markdown) files over `.txt`—well-structured Markdown is chunked and retrieved more accurately.
- Use clear, descriptive headings and keep sections focused and reasonably short.
- Avoid ambiguity; include names, dates, units, and avoid ambiguous pronouns like "it" or "this" since prior chunks may not be present.AI Evy
12/29/2025, 12:57 AMAI Evy
12/29/2025, 12:57 AMAI Evy
12/29/2025, 12:57 AMBobster2002
12/29/2025, 12:58 AMAI Evy
12/29/2025, 12:58 AMAI Evy
12/29/2025, 12:59 AM.md (Markdown) files with clear, descriptive headings and short, focused sections. Avoid ambiguous pronouns like "it" or "this" since prior chunks may not be present. [(1) ]()
Recommendations:
- Ensure your knowledge base status shows "complete" rather than "in_progress" or "error"AI Evy
12/29/2025, 12:59 AMAI Evy
12/29/2025, 12:59 AMBobster2002
12/29/2025, 1:05 AM