Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

Why RAG Gets Table Questions Wrong—and How to Start with GraphRAG

Chunked text retrieval can lose table structure and miss rows needed for exact answers. Learn where GraphRAG helps, when SQL is essential, and how to start Microsoft's local CLI workflow.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

RAG systems can give wrong table answers when retrieval returns only part of a table, flattening breaks the links between headers and values, or the model is asked to calculate without a reliable operation over all relevant rows. GraphRAG can add useful entity relationships and corpus-wide context, but it is not a table calculator. For exact sums, counts, filters, percentages, and cross-row comparisons, keep the data structured and execute the tabular task with SQL.

Why does RAG get table questions wrong?

Tables carry meaning in the relationship among their headers, rows, cells, units, and sometimes footnotes. When a table is flattened into text and split into chunks, a retrieved passage may contain a value without its header, omit neighboring rows, or show only part of the data. A model answering from that incomplete context can mistake what a number means or treat a partial set as complete.

As an Amazon Associate I earn from qualifying purchases.

The 2025 TableRAG paper describes structural information loss and lack of a global view as problems in heterogeneous-document question answering. It gives the example of computing a percentage from retrieved top-N chunks rather than from the full table. That is a documented failure mode, not an explanation for every incorrect RAG answer; the paper does not establish a universal hallucination rate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate four failure points

  • Retrieval: the relevant rows, table, or surrounding explanation were not retrieved.
  • Representation: flattening or chunk boundaries obscured how a value relates to its header, unit, or other rows.
  • Execution: the system did not reliably calculate over the complete set of records the question requires.
  • Generation: the answer claims more than the available evidence supports.

These are distinct risks. Better retrieval alone cannot guarantee that an aggregation uses every required row, and a model that receives incomplete context should not present a partial result as a complete one.

Should you use SQL or GraphRAG for table questions?

Choose the method based on the operation the question requires. Microsoft GraphRAG builds graph structure from text to support entity-focused and corpus-wide reasoning. SQL executes explicit operations over structured records. Many document-heavy systems need both: retrieve relevant prose, query tables for exact results, then compose the answer with both sources visible.

Approach Best fit Strength Limit
Baseline vector RAG Questions answerable from a few relevant passages Simple top-k text retrieval; GraphRAG also offers a basic search mode Can miss required rows or fragmented table context; it does not ensure a complete aggregation [Microsoft GraphRAG query overview][TableRAG paper]
GraphRAG local search Questions centered on a specific entity and its connected concepts or source text Combines graph-derived context with related source text Not documented as exact SQL calculation over arbitrary tables [Microsoft local search documentation]
GraphRAG global search Broad themes or patterns across a corpus Uses community reports in a map-reduce-style synthesis Resource-intensive, and its summaries are not a substitute for exact table execution [Microsoft global search documentation][TableRAG paper]
Structured table store plus SQL and text retrieval Exact filters, counts, sums, percentages, or cross-row calculations combined with document context SQL can operate on structured rows while retrieval supplies explanatory prose Requires table extraction and loading, schema handling, and query validation; these are implementation requirements, not a guarantee of correct answers [TableRAG paper]

Route calculations to structured execution

Use a structured table store when the answer depends on all rows matching a condition, a count, a sum, a percentage, or a comparison across records. Keep source-document and table references with the loaded data so the result can be traced back to its origin. Retrieve prose separately when the question also needs definitions, caveats, or narrative context.

The TableRAG paper describes a hybrid design that decomposes questions by modality, retrieves text, selectively writes and executes SQL, and composes intermediate answers. For a value lookup with clear headers and a small amount of context, carefully preserved table Markdown or row serialization may be enough; that is a practical design choice, not a result established by the cited paper.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use GraphRAG for relationships and synthesis

GraphRAG extracts entities, relationships, and claims from text units, clusters the entity graph into communities, and generates community summaries. Those structures can help answer questions about how concepts or entities connect, or synthesize themes across a corpus. Microsoft documents local, global, DRIFT, and basic query modes; none is documented as a guarantee of exact arithmetic on arbitrary tables.

A combined design can use GraphRAG for document relationships and broader context while using a structured table store for calculations. Treat that as an architectural synthesis, not a published performance result.

Which GraphRAG search mode should you use?

  • Local: choose this for an entity-specific question involving connected entities, relationships, and associated source text. It brings graph context and related text chunks into the query context.
  • Global: choose this for holistic questions about themes or patterns across the corpus. It synthesizes community reports and is described as resource-intensive.
  • DRIFT: use this when a question starts from a particular entity but needs community context to broaden and refine the exploration.
  • Basic: use ordinary top-k vector retrieval when baseline RAG is suitable for the question.

Microsoft cautions that GraphRAG may not produce the best results out of the box and recommends prompt tuning. Its global-search documentation says setting allow_general_knowledge to true may increase hallucinations. Keep source evidence available to the answer step, make missing evidence explicit, and evaluate with representative questions rather than assuming a search mode is accurate by default.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to run Microsoft’s minimal GraphRAG starter locally

The documented starter is a local CLI project and index workflow, not an offline-only model setup. Microsoft currently specifies Python 3.10–3.12 and warns that GraphRAG can consume substantial LLM resources. The documented OpenAI or Azure OpenAI configuration uses an API key for model calls. Check the official quickstart for current installation and configuration details, since they can change with releases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Create the project environment

mkdir graphrag_quickstart
cd graphrag_quickstart
python -m venv .venv
source .venv/bin/activate          # Unix/macOS
python -m pip install graphrag
graphrag init

On Windows, activate the virtual environment using the command appropriate to your shell; the command above is the quickstart’s Unix/macOS activation form.

Best Value
Sale
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
  • Use scikit-learn to track an example ML project end to end
  • Explore several models, including support vector machines, decision trees, random forests, and ensemble methods
  • Exploit unsupervised learning techniques such as dimensionality reduction, clustering, and anomaly detection
  • Dive into neural net architectures, including convolutional nets, recurrent nets, generative adversarial networks, autoencoders, diffusion models, and transformers
  • Use TensorFlow and Keras to build and train neural nets for computer vision, natural language processing, generative models, and deep reinforcement learning

2. Configure the workspace and model provider

Initialization creates project files including settings.yaml, an input directory, and a generated .env file. Set the API key in .env for the documented OpenAI or Azure OpenAI route, review the model and pipeline settings, and place a small representative text corpus in input/. Start with a limited sample: indexing can use substantial model resources.

3. Index and query

graphrag index
graphrag query "What are the top themes in this corpus?"
graphrag query "Which entities are connected to the key subject?" --method local

The quickstart’s default query example uses global search; its entity-specific example explicitly selects --method local. By default, indexing writes Parquet outputs and embeddings to the configured vector store. These local project and index files do not make the configured model calls local or offline.

How to add a reliable table path

The GraphRAG quickstart does not supply a table-arithmetic pipeline. For a table-heavy application, add an explicit structured-data path instead of expecting graph indexing to perform calculations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Load tables into a structured store. Preserve the schema, units, and relevant footnotes rather than relying only on flattened text.
  2. Keep provenance. Store a reference from each record to its source document and table so returned values can be checked.
  3. Route operations deliberately. Send sums, counts, filters, percentages, and cross-row comparisons through validated SQL; use text retrieval for explanatory passages.
  4. Compose from both results. Have the answer step distinguish SQL results from retrieved prose and identify missing evidence instead of filling gaps with an unsupported estimate.
  5. Test representative questions. Include lookups, filters, aggregations, and questions that combine a numeric result with a document explanation.

This is an implementation pattern informed by the TableRAG paper’s text-plus-SQL approach, not a tested recipe from Microsoft’s GraphRAG quickstart. TableRAG’s HeteQA benchmark contains 304 examples across nine domains, with five tabular operations per example. That describes the benchmark’s scope; it is not a general RAG accuracy rate or evidence that GraphRAG fixes table errors.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.