RAG Tools in 2026: Ground AI Answers in Your Documents
RAG gives a language model selected passages from your documents before it answers. It can make the model reference a policy, contract, or manual rather than relying only on training data. It cannot fix missing files, poor parsing, weak search, stale indexes, or conflicting documents.
How RAG assembles an answer
A RAG application has two stages. Indexing imports files, extracts text, preserves structure and metadata, splits content into chunks, and creates searchable representations. At query time, it retrieves candidate chunks, applies access filters, reranks results, adds the strongest passages to the model context, and generates an answer with references to their original locations.
Chunking affects retrieval. Section, paragraph, and sentence boundaries often preserve more meaning than fixed token windows. Overlap retains context across boundaries but increases storage and duplicate results. Microsoft recommends testing chunk size and split method, including small-to-big and sliding-window expansion.
Embeddings represent text as numeric vectors, allowing paraphrased queries to find related content. Sparse lexical search, including BM25, remains useful for product codes, names, legal terms, and exact numbers. Hybrid retrieval combines both.
Reranking can improve precision while adding latency. It cannot recover text that was never indexed. Citations should identify the supporting page, section, row, or passage.
No-code document assistants
The fastest option is usually the product where your files already live. These tools reduce setup, but limit control over chunking, retrieval, embeddings, and evaluation.
| Product | Price | Best for | Limits |
|---|---|---|---|
| ChatGPT Projects and Apps | Existing ChatGPT plan | Personal and small-team files | 5 to 40 files per project; 10 at once |
| Claude Projects | Free; Pro $20/month in the US | Long project knowledge | Free accounts allow five projects |
| Gemini Notebook | Free baseline; paid Google AI plans | Source-based research | 50 sources per standard notebook |
| Copilot with SharePoint | Microsoft 365 Copilot license | Microsoft 365 content | Advanced work uses Copilot Credits |
| Glean | Negotiated seats plus FlexCredits | Enterprise search | No universal public seat price |
| ChatGPT Apps | Existing ChatGPT plan | Connected services | External apps may impose limits |
ChatGPT permits five files per project on free accounts, 25 on Go and Plus, and 40 on Edu, Pro, Business, and Enterprise. Only 10 files can be uploaded at once. OpenAI calls connectors Apps. OpenAI-built apps are search-only; eligible custom MCP apps can write, creating prompt-injection risk.
Claude Projects allow five projects on free accounts. Paid plans add RAG-based project knowledge and can expand capacity up to 10 times near context limits. Claude Pro costs $20 monthly in the United States before tax.
Gemini Notebook lists 100 notebooks per user, 50 sources per notebook, 50 daily chats, and three daily audio generations. Each upload supports up to 500,000 words or 200 MB.
Copilot requires a Microsoft 365 Copilot license. Large-scale synthesis, site creation, scheduled workflows, metadata filling, and analytics use Copilot Credits. Glean offers permission-aware enterprise search with seats and pooled FlexCredits.
Developer frameworks and retrieval design
LlamaIndex fits applications centered on connecting varied data to an LLM. Its components cover connectors, indexes, query and chat engines, agents, workflows, and evaluation integrations, keeping ingestion and retrieval visible.
I would choose LangChain for broader application and agent orchestration. It provides model and tool integrations, middleware, LangGraph, and LangSmith tracing and evaluation. Retrievers and vector-store integrations make it suitable when RAG is one feature among several.
Haystack uses composable pipelines for RAG, agents, and multimodal search. Its Document Stores, sparse and dense retrievers, generators, and agents support comparisons of BM25, embeddings, and hybrid search.
Production ingestion should preserve source IDs, permissions, versions, page or section coordinates, timestamps, file types, tenant, department, access level, document type, and effective date. Parse tables and scanned PDFs separately. Filter permissions before exposing passages to the model.
A practical query path can rewrite questions, split requests, skip retrieval when unnecessary, retrieve extra candidates, deduplicate chunks, rerank, and enforce a context budget. Irrelevant passages can obscure the answer.
Vector databases and indexes
Database choice matters most when you need tenant isolation, updates, observability, predictable latency, or operational control.
- Pinecone: A managed vector service for teams that prefer hosted operations.
- Weaviate: An open-source or hosted database with hybrid search and multitenancy.
- Qdrant: An open-source or managed vector database. Size memory and replicas against your workload.
- Milvus: An open-source vector database, with Zilliz Cloud as a managed option.
- pgvector: A PostgreSQL extension with exact search and approximate HNSW or IVFFlat indexes. I would start here when application data already lives in PostgreSQL.
- Chroma: An open-source retrieval database with a hosted Cloud option.
Compare the same corpus and query set before moving databases. Include metadata filters, updates, deletions, concurrent traffic and recovery requirements in the trial. A free development instance is a poor basis for predicting a production bill. Ask for separate estimates for storage, indexing, reads, writes, replicas and data transfer. Keep document identifiers outside the vector index so rebuilding it does not break citations.
Managed RAG and model costs
Managed services reduce infrastructure work, but their pricing and controls differ. OpenAI File Search costs $0.10 per GB daily, with 1 GB free, plus $2.50 per 1,000 tool calls. Model tokens cost extra. Keep Responses API settings separate from older Assistants API documentation. Request the search results during development so an answer can be compared with the passages selected.
Vertex AI RAG Engine supports Google-managed or customer-managed vector databases. Google bills parsing, embeddings, reranking, and storage separately. Its managed database uses Spanner. Budget for that backend even when query traffic is low.
Amazon Bedrock Knowledge Bases supports managed or customer-managed storage. AWS lists $5 per GB monthly for raw index storage and $1 per 1,000 standard Retrieve calls. Agentic retrieval costs $4 per 1,000 calls plus $1 per 1,000 underlying Retrieve calls. Model charges are separate. Managed parsing, embeddings, and reranking have no extra service charge.
Embedding prices include OpenAI text-embedding-3-small at $0.02 per million tokens and text-embedding-3-large at $0.13. Cohere Embed 5 costs $0.12 per million tokens for Pro and $0.08 for Fast. voyage-4-large costs $0.12, voyage-4 $0.06, and voyage-4-lite $0.02. Voyage rerank-3 costs $0.05 per million processed tokens; rerank-3-lite costs $0.02. Voyage AI is owned by MongoDB. Cohere bills Rerank by searches: one search covers a query and up to 100 documents, with longer documents split for billing. Candidate count therefore affects both latency and cost.
Evaluation with Ragas
Ragas measures retrieval and response quality with Context Precision, Context Recall, Context Entities Recall, Noise Sensitivity, Response Relevancy, and Faithfulness.
Context Recall checks whether selected passages contain information needed for a reference answer. Context Precision measures the share of selected content that is relevant. Faithfulness measures how much of an answer is supported by context, on a 0 to 1 scale. Response Relevancy checks whether the answer addresses the question.
Build tests from real questions, expected answer points, document versions, permissions, and difficult queries. Record chunk IDs and scores. A plausible answer despite low recall should trigger manual review. Low faithfulness with strong recall suggests synthesis, instructions, or contradiction handling problems.
Ragas documents a BM25 failure that missed repository creation details. Inspect traces and annotate failures before changing models. Treat automated judges as measurement aids, then inspect high and low scores.
Keep a fixed regression set and repeat it after changing parsing, chunking, embeddings, retrieval settings or the generation model. Record latency and cost alongside quality.
Failure modes and security tests
Test missing content first. OCR may lose tables, parsers may skip images, and stale indexes may omit changed policies. Check extracted text, file counts, timestamps, and versions before adjusting ranking.
Retrieval can miss answers. Test hybrid search, metadata filters, query rewriting, and candidate counts. Reranking changes order but cannot recover missing chunks.
Log candidates before and after filtering, reranking, and context assembly. Deduplication, summarization, token limits, contradictory policies, and tables can remove or obscure useful passages. Label document dates and require answers to identify disagreements.
Apply permissions before retrieval. Test leakage through restricted titles, snippets, counts, and metadata. Treat imported instructions as untrusted because files can contain prompt injection.
Test citation support separately. Require a source ID, page or section, and supporting text span for each important claim. For numerical answers, confirm the span includes the number and unit.
Recommendations by reader type
Small document sets: Choose Gemini Notebook for source-focused research, Claude Projects for ongoing writing, or ChatGPT Projects if work already lives in ChatGPT. Check file location, citations, limits, and privacy.
Microsoft 365 organizations: Choose Copilot with SharePoint when SharePoint libraries, pages, lists, and permissions hold the main corpus. Budget separately for advanced work with Copilot Credits.
Enterprise search teams: Evaluate Glean for connectors, permission enforcement, hybrid search, and a managed assistant. Request pricing for seats, FlexCredits, models, and API use.
Developers: Use LlamaIndex for data-centered RAG, LangChain for agent applications, and Haystack for reusable pipelines. Start with pgvector if PostgreSQL stores application data.
Managed vector services: Compare Pinecone, Weaviate, Qdrant, Milvus through Zilliz Cloud, and Chroma by reads, writes, storage, filtering, replicas, and egress.
Cloud-first teams: Consider OpenAI File Search, Vertex AI RAG Engine, or Bedrock Knowledge Bases after checking parsing and retrieval constraints. Use a framework and database for custom chunking, models, or permissions.
Production teams: Build a Ragas test set, measure retrieval and faithfulness separately, preserve source coordinates, and test stale files, tables, contradictions, access boundaries, prompt injection, and unsupported citations.
Frequently asked questions
What is RAG in artificial intelligence?
Retrieval-augmented generation searches a document collection and places relevant passages in a language model’s context before generation. The model answers from those passages instead of relying only on training memory. A useful system also preserves permissions, source locations, versions, and citations. RAG can improve grounding, but it cannot guarantee correctness when parsing or retrieval fails.
Which RAG tool is best for personal documents?
Gemini Notebook suits source-based research and notebooks with explicit source limits. Claude Projects fits ongoing writing and project knowledge, while ChatGPT Projects suits users already working in ChatGPT and its Apps. The practical choice depends on file location, citation needs, plan limits, and privacy requirements. Test real questions before choosing a subscription for a group.
Is pgvector a vector database?
pgvector is a PostgreSQL extension rather than a separate database product. It stores vector columns and indexes beside ordinary relational data. It supports exact search and approximate indexes such as HNSW and IVFFlat, along with several distance functions. It fits applications that already need PostgreSQL joins, transactions, backups, and access controls.
How much does OpenAI File Search cost?
OpenAI lists File Search storage at $0.10 per GB daily, with 1 GB free, and tool calls at $2.50 per 1,000 calls. Model prompt and response tokens are separate. Storage and calls are not the complete bill because file limits, context limits, and model generation costs also affect a RAG application.
Do embeddings prevent hallucinations?
Embeddings improve the chance that relevant passages are found, but they do not prevent hallucinations. Errors can come from missing files, OCR, chunk boundaries, ranking, contradictory documents, or a model ignoring context. Measure retrieval recall and answer faithfulness separately. Require citations tied to exact spans and instruct the model to state when the corpus lacks an answer.
What should a RAG evaluation measure?
Measure retrieval recall, retrieval precision, answer relevance, and faithfulness to selected context. Ragas provides Context Recall, Context Precision, Response Relevancy, Noise Sensitivity, and Faithfulness. Add tests for stale versions, permissions, tables, contradictions, citation support, and prompt injection. Keep real user questions in a fixed test set so changes can be compared.
Sources
- OpenAI Projects file limits and collaboration
- Anthropic Claude Projects
- Google Gemini Notebook plan limits
- Ragas retrieval and answer evaluation metrics
- Microsoft Copilot in SharePoint
- Glean Enterprise Flex pricing
- Microsoft advanced RAG guidance
- OpenAI API pricing
- Google Vertex AI RAG Engine billing
- Amazon Bedrock pricing
- Cohere Embed 5
- Voyage pricing