Point11

Training agents on your data

Build a RAG knowledge base that grounds your AI agent in accurate, up-to-date product and company information.

AI agents are only as good as the knowledge they draw from. Retrieval-Augmented Generation (RAG) grounds agent responses in your actual data rather than the LLM's general training data. This prevents hallucination and ensures accuracy.

How RAG Works

RAG extends LLM capabilities by retrieving relevant documents from a trusted knowledge store before generating a response. It is essentially "open book" answering where the model reads before it writes.

The pipeline:

  • Document Ingestion: Parse, chunk, and embed your documents into a vector store.
  • Query Processing: The user's question is embedded and used to retrieve semantically similar document chunks.
  • Context Assembly: Retrieved chunks are injected into the LLM prompt as context.
  • Response Generation: The LLM generates a response grounded in the retrieved context, with the ability to cite specific sources.

What to Include in Your Knowledge Base

Comprehensive coverage is critical. Include:

  • Product catalog: Names, descriptions, features, specifications, pricing, and availability.
  • Pricing and packaging: Plan tiers, volume discounts, enterprise pricing models.
  • FAQ content: Common questions and their authoritative answers.
  • Policies: Return policies, SLAs, support procedures, compliance certifications.
  • Technical documentation: API docs, integration guides, system requirements.
  • Competitive positioning: How your products compare to alternatives (factually, not speculatively).
  • Sales collateral: Case studies, ROI data, customer testimonials.

Advanced Retrieval Techniques

Basic RAG uses vector similarity search. For enterprise deployments, more sophisticated approaches improve accuracy:

  • Hybrid Search: Combine keyword (lexical) search with vector (semantic) search, then apply a reranker to surface the most relevant results. Especially valuable for policy, legal, and technical content where exact terminology matters.
  • HyDE (Hypothetical Document Embeddings): Generate a hypothetical answer to the query, embed it, then retrieve real documents similar to that hypothesis. Improves recall for niche or ambiguous queries.
  • Query Rewriting: A lightweight model rewrites or expands the user's query before sending it to the retriever. Helps when users ask vague or colloquial questions.
  • Agentic Retrieval: The agent orchestrates when and how to retrieve, deciding whether to search the knowledge base, query an API, or use information already in the conversation context.

Data Pipeline Best Practices

  • Chunking strategy: Split documents into semantically meaningful chunks (not arbitrary character limits). Headings, sections, and paragraphs make natural boundaries.
  • Metadata enrichment: Tag chunks with source document, section, date, and product category. This enables filtered retrieval and source attribution.
  • Freshness management: Re-index when source content changes. Expire caches with content-hash keys. Add document effective dates to chunks so the agent knows when information was last verified.
  • Quality validation: Regularly test retrieval quality by running sample queries and verifying the agent returns accurate, relevant information.

Security for Multi-Tenant Deployments

  • Enforce document-level access controls in the retriever. Different clients should only see their own data.
  • Use multi-tenancy isolation for B2B scenarios. Never use "one big bucket" vector stores across clients.
  • Apply data privacy and sovereignty controls that filter information based on user role and geography.
  • Run Data Protection Impact Assessments (DPIAs) where personal data is involved.

Sources

Need help implementing this?

Our team can walk you through the setup.