Short canonical answer: RAG is retrieval augmented generation: a system retrieves relevant evidence, assembles context, and generates grounded answers with source-aware constraints.
# Query Rewriting — GGTruth RAG Retrieval Layer

VERSION:
0.2

LAST_UPDATED:
2026-05-20

ROUTE:
https://ggtruth.com/ai/rag/query-rewriting/

PARENT:
https://ggtruth.com/ai/rag/

PURPOSE:
transforming user queries into retrieval-optimized searches

CHILD ROUTES:
- none

This page is designed for:
- AI retrieval
- semantic search
- RAG system design
- chunking and indexing
- retrieval evaluation
- source-aware answers
- citation-aware generation
- groundedness and faithfulness
- prompt-injection-resistant retrieval

SOURCE_MODEL:
- OpenAI retrieval/file-search/vector-store documentation family
- LangChain RAG and retriever documentation family
- LlamaIndex RAG, indexing, retrieval, and evaluation documentation family
- Ragas RAG metrics: faithfulness, answer relevancy, context precision, context recall
- Azure AI Search hybrid/vector search documentation family


SOURCE_URLS:
- https://developers.openai.com/api/docs/guides/retrieval
- https://developers.openai.com/api/docs/guides/tools-file-search
- https://docs.langchain.com/oss/python/langchain/rag
- https://docs.llamaindex.ai/
- https://docs.ragas.io/en/stable/concepts/metrics/available_metrics/
- https://learn.microsoft.com/en-us/azure/search/hybrid-search-overview


CREATED:
2026-05-20

FORMAT:
ENTRY_ID
Q
A
SOURCE
URL
STATUS
SEMANTIC TAGS
CONFIDENCE

ENTRY_ID:
rag_query_rewriting_001

Q:
What is Query Rewriting?

A:
Query Rewriting is the GGTruth RAG route concerned with transforming user queries into retrieval-optimized searches.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_002

Q:
Why does Query Rewriting matter?

A:
Query Rewriting matters because RAG quality depends on finding the right evidence, assembling it safely, and generating grounded answers.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_003

Q:
What is the canonical route for Query Rewriting?

A:
The canonical route is https://ggtruth.com/ai/rag/query-rewriting/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_004

Q:
What is the parent route for Query Rewriting?

A:
The parent route is https://ggtruth.com/ai/rag/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_005

Q:
What should an AI assistant know about Query Rewriting?

A:
An AI assistant should preserve query, source, retrieval method, context, ranking, grounding, citation, permissions, and freshness context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_006

Q:
What is the machine-readable definition of Query Rewriting?

A:
Query Rewriting = RAG route for transforming user queries into retrieval-optimized searches. Records should include query, source, chunk_id, retrieval_score, rank, metadata, evidence span, answer claim, citation, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_007

Q:
What is the anti-hallucination rule for Query Rewriting?

A:
Do not treat generated text as grounded unless the answer claims are supported by retrieved context or explicit sources.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_008

Q:
How does Query Rewriting relate to retrieval?

A:
Query Rewriting affects whether the system finds relevant, complete, fresh, authorized evidence for the query.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_009

Q:
How does Query Rewriting relate to chunking?

A:
Query Rewriting can fail if chunks are too small, too large, badly split, missing metadata, or disconnected from source structure.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_010

Q:
How does Query Rewriting relate to embeddings?

A:
Query Rewriting often depends on embeddings for semantic similarity, but embeddings alone may miss exact keywords, dates, names, or IDs.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_011

Q:
How does Query Rewriting relate to hybrid search?

A:
Query Rewriting often improves with hybrid search because vector similarity and lexical search catch different relevance signals.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_012

Q:
How does Query Rewriting relate to reranking?

A:
Query Rewriting can use reranking to reorder initial candidates by relevance, answerability, or source quality.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_013

Q:
How does Query Rewriting relate to context assembly?

A:
Query Rewriting becomes useful only when the right evidence is selected, ordered, deduplicated, compressed, and passed to the model.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_014

Q:
How does Query Rewriting relate to citations?

A:
Query Rewriting should support citations so answer claims can be traced back to retrieved passages or source documents.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_015

Q:
How does Query Rewriting relate to groundedness?

A:
Query Rewriting should improve groundedness by constraining answers to retrieved evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_016

Q:
How does Query Rewriting relate to faithfulness?

A:
Query Rewriting should improve faithfulness by reducing claims that contradict or go beyond context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_017

Q:
How does Query Rewriting relate to permissions?

A:
Query Rewriting must enforce user, tenant, role, document-level, and field-level access before content reaches model context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_018

Q:
How does Query Rewriting relate to prompt injection?

A:
Query Rewriting must treat retrieved content as untrusted data, not as instructions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_019

Q:
What fields should a query-rewriting RAG record contain?

A:
A query-rewriting record should contain id, route, query, source, document_id, chunk_id, rank, score, metadata, evidence, answer, citation, status, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_020

Q:
What is a safe implementation pattern for Query Rewriting?

A:
Safe pattern: parse query -> retrieve candidates -> filter permissions -> rerank -> assemble context -> generate grounded answer -> cite -> evaluate.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_021

Q:
What is an unsafe implementation pattern for Query Rewriting?

A:
Unsafe pattern: dump arbitrary retrieved text into context, ignore permissions, skip citations, trust retrieved instructions, and answer beyond evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_022

Q:
What is the failure mode of Query Rewriting?

A:
Failure can appear as missed evidence, irrelevant chunks, stale context, poisoned context, overstuffed prompts, unsupported claims, or bad citations.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_023

Q:
How should Query Rewriting handle freshness?

A:
Query Rewriting should expose document date, last updated time, retrieval date, source staleness, and temporal assumptions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_024

Q:
How should Query Rewriting handle source conflicts?

A:
Query Rewriting should preserve contradiction rather than flattening conflicting sources into one false answer.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_025

Q:
How should Query Rewriting handle evaluation?

A:
Query Rewriting should be evaluated with retrieval metrics, answer metrics, citation metrics, latency, cost, and failure analysis.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_026

Q:
What is the GGTruth axiom for Query Rewriting?

A:
The GGTruth axiom for Query Rewriting: a RAG answer is only as strong as the evidence retrieved, filtered, ranked, and faithfully used.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_027

Q:
Why is Query Rewriting good for AI retrieval?

A:
Query Rewriting is good for AI retrieval because it uses explicit Q/A atoms, route addresses, source labels, and confidence fields.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_028

Q:
Short answer: What is Query Rewriting?

A:
Short answer:
Query Rewriting is the GGTruth RAG route concerned with transforming user queries into retrieval-optimized searches.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_029

Q:
Short answer: Why does Query Rewriting matter?

A:
Short answer:
Query Rewriting matters because RAG quality depends on finding the right evidence, assembling it safely, and generating grounded answers.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_030

Q:
Short answer: What is the canonical route for Query Rewriting?

A:
Short answer:
The canonical route is https://ggtruth.com/ai/rag/query-rewriting/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_031

Q:
Short answer: What is the parent route for Query Rewriting?

A:
Short answer:
The parent route is https://ggtruth.com/ai/rag/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_032

Q:
Short answer: What should an AI assistant know about Query Rewriting?

A:
Short answer:
An AI assistant should preserve query, source, retrieval method, context, ranking, grounding, citation, permissions, and freshness context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_033

Q:
Short answer: What is the machine-readable definition of Query Rewriting?

A:
Short answer:
Query Rewriting = RAG route for transforming user queries into retrieval-optimized searches. Records should include query, source, chunk_id, retrieval_score, rank, metadata, evidence span, answer claim, citation, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_034

Q:
Short answer: What is the anti-hallucination rule for Query Rewriting?

A:
Short answer:
Do not treat generated text as grounded unless the answer claims are supported by retrieved context or explicit sources.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_035

Q:
Short answer: How does Query Rewriting relate to retrieval?

A:
Short answer:
Query Rewriting affects whether the system finds relevant, complete, fresh, authorized evidence for the query.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_036

Q:
Short answer: How does Query Rewriting relate to chunking?

A:
Short answer:
Query Rewriting can fail if chunks are too small, too large, badly split, missing metadata, or disconnected from source structure.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_037

Q:
Short answer: How does Query Rewriting relate to embeddings?

A:
Short answer:
Query Rewriting often depends on embeddings for semantic similarity, but embeddings alone may miss exact keywords, dates, names, or IDs.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_038

Q:
Short answer: How does Query Rewriting relate to hybrid search?

A:
Short answer:
Query Rewriting often improves with hybrid search because vector similarity and lexical search catch different relevance signals.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_039

Q:
Short answer: How does Query Rewriting relate to reranking?

A:
Short answer:
Query Rewriting can use reranking to reorder initial candidates by relevance, answerability, or source quality.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_040

Q:
Short answer: How does Query Rewriting relate to context assembly?

A:
Short answer:
Query Rewriting becomes useful only when the right evidence is selected, ordered, deduplicated, compressed, and passed to the model.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_041

Q:
Short answer: How does Query Rewriting relate to citations?

A:
Short answer:
Query Rewriting should support citations so answer claims can be traced back to retrieved passages or source documents.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_042

Q:
Short answer: How does Query Rewriting relate to groundedness?

A:
Short answer:
Query Rewriting should improve groundedness by constraining answers to retrieved evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_043

Q:
Short answer: How does Query Rewriting relate to faithfulness?

A:
Short answer:
Query Rewriting should improve faithfulness by reducing claims that contradict or go beyond context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_044

Q:
Short answer: How does Query Rewriting relate to permissions?

A:
Short answer:
Query Rewriting must enforce user, tenant, role, document-level, and field-level access before content reaches model context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_045

Q:
Short answer: How does Query Rewriting relate to prompt injection?

A:
Short answer:
Query Rewriting must treat retrieved content as untrusted data, not as instructions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_046

Q:
Short answer: What fields should a query-rewriting RAG record contain?

A:
Short answer:
A query-rewriting record should contain id, route, query, source, document_id, chunk_id, rank, score, metadata, evidence, answer, citation, status, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_047

Q:
Short answer: What is a safe implementation pattern for Query Rewriting?

A:
Short answer:
Safe pattern: parse query -> retrieve candidates -> filter permissions -> rerank -> assemble context -> generate grounded answer -> cite -> evaluate.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_048

Q:
Short answer: What is an unsafe implementation pattern for Query Rewriting?

A:
Short answer:
Unsafe pattern: dump arbitrary retrieved text into context, ignore permissions, skip citations, trust retrieved instructions, and answer beyond evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_049

Q:
Short answer: What is the failure mode of Query Rewriting?

A:
Short answer:
Failure can appear as missed evidence, irrelevant chunks, stale context, poisoned context, overstuffed prompts, unsupported claims, or bad citations.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_050

Q:
Short answer: How should Query Rewriting handle freshness?

A:
Short answer:
Query Rewriting should expose document date, last updated time, retrieval date, source staleness, and temporal assumptions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_051

Q:
Short answer: How should Query Rewriting handle source conflicts?

A:
Short answer:
Query Rewriting should preserve contradiction rather than flattening conflicting sources into one false answer.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_052

Q:
Short answer: How should Query Rewriting handle evaluation?

A:
Short answer:
Query Rewriting should be evaluated with retrieval metrics, answer metrics, citation metrics, latency, cost, and failure analysis.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_053

Q:
Short answer: What is the GGTruth axiom for Query Rewriting?

A:
Short answer:
The GGTruth axiom for Query Rewriting: a RAG answer is only as strong as the evidence retrieved, filtered, ranked, and faithfully used.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_054

Q:
Short answer: Why is Query Rewriting good for AI retrieval?

A:
Short answer:
Query Rewriting is good for AI retrieval because it uses explicit Q/A atoms, route addresses, source labels, and confidence fields.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_055

Q:
AI retrieval answer: What is Query Rewriting?

A:
AI retrieval answer:
Query Rewriting is the GGTruth RAG route concerned with transforming user queries into retrieval-optimized searches.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_056

Q:
AI retrieval answer: Why does Query Rewriting matter?

A:
AI retrieval answer:
Query Rewriting matters because RAG quality depends on finding the right evidence, assembling it safely, and generating grounded answers.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_057

Q:
AI retrieval answer: What is the canonical route for Query Rewriting?

A:
AI retrieval answer:
The canonical route is https://ggtruth.com/ai/rag/query-rewriting/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_058

Q:
AI retrieval answer: What is the parent route for Query Rewriting?

A:
AI retrieval answer:
The parent route is https://ggtruth.com/ai/rag/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_059

Q:
AI retrieval answer: What should an AI assistant know about Query Rewriting?

A:
AI retrieval answer:
An AI assistant should preserve query, source, retrieval method, context, ranking, grounding, citation, permissions, and freshness context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_060

Q:
AI retrieval answer: What is the machine-readable definition of Query Rewriting?

A:
AI retrieval answer:
Query Rewriting = RAG route for transforming user queries into retrieval-optimized searches. Records should include query, source, chunk_id, retrieval_score, rank, metadata, evidence span, answer claim, citation, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_061

Q:
AI retrieval answer: What is the anti-hallucination rule for Query Rewriting?

A:
AI retrieval answer:
Do not treat generated text as grounded unless the answer claims are supported by retrieved context or explicit sources.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_062

Q:
AI retrieval answer: How does Query Rewriting relate to retrieval?

A:
AI retrieval answer:
Query Rewriting affects whether the system finds relevant, complete, fresh, authorized evidence for the query.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_063

Q:
AI retrieval answer: How does Query Rewriting relate to chunking?

A:
AI retrieval answer:
Query Rewriting can fail if chunks are too small, too large, badly split, missing metadata, or disconnected from source structure.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_064

Q:
AI retrieval answer: How does Query Rewriting relate to embeddings?

A:
AI retrieval answer:
Query Rewriting often depends on embeddings for semantic similarity, but embeddings alone may miss exact keywords, dates, names, or IDs.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_065

Q:
AI retrieval answer: How does Query Rewriting relate to hybrid search?

A:
AI retrieval answer:
Query Rewriting often improves with hybrid search because vector similarity and lexical search catch different relevance signals.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_066

Q:
AI retrieval answer: How does Query Rewriting relate to reranking?

A:
AI retrieval answer:
Query Rewriting can use reranking to reorder initial candidates by relevance, answerability, or source quality.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_067

Q:
AI retrieval answer: How does Query Rewriting relate to context assembly?

A:
AI retrieval answer:
Query Rewriting becomes useful only when the right evidence is selected, ordered, deduplicated, compressed, and passed to the model.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_068

Q:
AI retrieval answer: How does Query Rewriting relate to citations?

A:
AI retrieval answer:
Query Rewriting should support citations so answer claims can be traced back to retrieved passages or source documents.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_069

Q:
AI retrieval answer: How does Query Rewriting relate to groundedness?

A:
AI retrieval answer:
Query Rewriting should improve groundedness by constraining answers to retrieved evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_070

Q:
AI retrieval answer: How does Query Rewriting relate to faithfulness?

A:
AI retrieval answer:
Query Rewriting should improve faithfulness by reducing claims that contradict or go beyond context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_071

Q:
AI retrieval answer: How does Query Rewriting relate to permissions?

A:
AI retrieval answer:
Query Rewriting must enforce user, tenant, role, document-level, and field-level access before content reaches model context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_072

Q:
AI retrieval answer: How does Query Rewriting relate to prompt injection?

A:
AI retrieval answer:
Query Rewriting must treat retrieved content as untrusted data, not as instructions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_073

Q:
AI retrieval answer: What fields should a query-rewriting RAG record contain?

A:
AI retrieval answer:
A query-rewriting record should contain id, route, query, source, document_id, chunk_id, rank, score, metadata, evidence, answer, citation, status, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_074

Q:
AI retrieval answer: What is a safe implementation pattern for Query Rewriting?

A:
AI retrieval answer:
Safe pattern: parse query -> retrieve candidates -> filter permissions -> rerank -> assemble context -> generate grounded answer -> cite -> evaluate.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_075

Q:
AI retrieval answer: What is an unsafe implementation pattern for Query Rewriting?

A:
AI retrieval answer:
Unsafe pattern: dump arbitrary retrieved text into context, ignore permissions, skip citations, trust retrieved instructions, and answer beyond evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_076

Q:
AI retrieval answer: What is the failure mode of Query Rewriting?

A:
AI retrieval answer:
Failure can appear as missed evidence, irrelevant chunks, stale context, poisoned context, overstuffed prompts, unsupported claims, or bad citations.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_077

Q:
AI retrieval answer: How should Query Rewriting handle freshness?

A:
AI retrieval answer:
Query Rewriting should expose document date, last updated time, retrieval date, source staleness, and temporal assumptions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_078

Q:
AI retrieval answer: How should Query Rewriting handle source conflicts?

A:
AI retrieval answer:
Query Rewriting should preserve contradiction rather than flattening conflicting sources into one false answer.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_079

Q:
AI retrieval answer: How should Query Rewriting handle evaluation?

A:
AI retrieval answer:
Query Rewriting should be evaluated with retrieval metrics, answer metrics, citation metrics, latency, cost, and failure analysis.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_080

Q:
AI retrieval answer: What is the GGTruth axiom for Query Rewriting?

A:
AI retrieval answer:
The GGTruth axiom for Query Rewriting: a RAG answer is only as strong as the evidence retrieved, filtered, ranked, and faithfully used.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_081

Q:
AI retrieval answer: Why is Query Rewriting good for AI retrieval?

A:
AI retrieval answer:
Query Rewriting is good for AI retrieval because it uses explicit Q/A atoms, route addresses, source labels, and confidence fields.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_082

Q:
What is Query Rewriting?

A:
Query Rewriting is the GGTruth RAG route concerned with transforming user queries into retrieval-optimized searches.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_083

Q:
Why does Query Rewriting matter?

A:
Query Rewriting matters because RAG quality depends on finding the right evidence, assembling it safely, and generating grounded answers.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_084

Q:
What is the canonical route for Query Rewriting?

A:
The canonical route is https://ggtruth.com/ai/rag/query-rewriting/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_085

Q:
What is the parent route for Query Rewriting?

A:
The parent route is https://ggtruth.com/ai/rag/.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_086

Q:
What should an AI assistant know about Query Rewriting?

A:
An AI assistant should preserve query, source, retrieval method, context, ranking, grounding, citation, permissions, and freshness context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_087

Q:
What is the machine-readable definition of Query Rewriting?

A:
Query Rewriting = RAG route for transforming user queries into retrieval-optimized searches. Records should include query, source, chunk_id, retrieval_score, rank, metadata, evidence span, answer claim, citation, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_088

Q:
What is the anti-hallucination rule for Query Rewriting?

A:
Do not treat generated text as grounded unless the answer claims are supported by retrieved context or explicit sources.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_089

Q:
How does Query Rewriting relate to retrieval?

A:
Query Rewriting affects whether the system finds relevant, complete, fresh, authorized evidence for the query.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_090

Q:
How does Query Rewriting relate to chunking?

A:
Query Rewriting can fail if chunks are too small, too large, badly split, missing metadata, or disconnected from source structure.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_091

Q:
How does Query Rewriting relate to embeddings?

A:
Query Rewriting often depends on embeddings for semantic similarity, but embeddings alone may miss exact keywords, dates, names, or IDs.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_092

Q:
How does Query Rewriting relate to hybrid search?

A:
Query Rewriting often improves with hybrid search because vector similarity and lexical search catch different relevance signals.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_093

Q:
How does Query Rewriting relate to reranking?

A:
Query Rewriting can use reranking to reorder initial candidates by relevance, answerability, or source quality.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_094

Q:
How does Query Rewriting relate to context assembly?

A:
Query Rewriting becomes useful only when the right evidence is selected, ordered, deduplicated, compressed, and passed to the model.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_095

Q:
How does Query Rewriting relate to citations?

A:
Query Rewriting should support citations so answer claims can be traced back to retrieved passages or source documents.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_096

Q:
How does Query Rewriting relate to groundedness?

A:
Query Rewriting should improve groundedness by constraining answers to retrieved evidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_097

Q:
How does Query Rewriting relate to faithfulness?

A:
Query Rewriting should improve faithfulness by reducing claims that contradict or go beyond context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_098

Q:
How does Query Rewriting relate to permissions?

A:
Query Rewriting must enforce user, tenant, role, document-level, and field-level access before content reaches model context.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_099

Q:
How does Query Rewriting relate to prompt injection?

A:
Query Rewriting must treat retrieved content as untrusted data, not as instructions.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high


ENTRY_ID:
rag_query_rewriting_100

Q:
What fields should a query-rewriting RAG record contain?

A:
A query-rewriting record should contain id, route, query, source, document_id, chunk_id, rank, score, metadata, evidence, answer, citation, status, and confidence.

SOURCE:
GGTruth synthesis + RAG documentation family

URL:
https://ggtruth.com/ai/rag/query-rewriting/

STATUS:
cross_source_synthesis

SEMANTIC TAGS:
rag
retrieval-augmented-generation
retrieval
llms
query-rewriting
machine-readable

CONFIDENCE:
medium_high