Research Assistant with RAG
Ground an agent in your own knowledge — internal docs, a research corpus, product manuals, policies — so it answers from your sources instead of guessing. This is the core RAG pattern.
The Approach
- Index your knowledge — load your documents into a vector database and configure it as a RAG source. You own the ingestion; TARX queries the populated store at runtime.
- Attach the RAG source to an agent — set a sensible
top_k(start with 3–5). Before each call, TARX retrieves the most relevant chunks and injects them as context. See RAG Enrichment. - Prompt for grounding — instruct the agent to answer from the retrieved context and to say when it doesn't know, rather than filling gaps from training data. Ask it to cite sources.
- Optional web fallback — add
web_searchso the agent can supplement internal knowledge with current public information, clearly separating the two.
Where It Fits
- An internal "ask the docs" assistant for your team
- Customer-facing answers grounded in your help center
- Literature review over a paper/report corpus
- Policy/compliance Q&A that must cite the source document
Patterns Used
| Pattern | Where |
|---|---|
| Retrieval-augmented answers | RAG sources |
| Per-agent knowledge | RAG enrichment |
| Grounded prompting | System prompts |
| Current-info fallback | web_search capability |