Skip to main content

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

  1. 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.
  2. 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.
  3. 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.
  4. Optional web fallback — add web_search so 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

PatternWhere
Retrieval-augmented answersRAG sources
Per-agent knowledgeRAG enrichment
Grounded promptingSystem prompts
Current-info fallbackweb_search capability