What it is
Retrieval-augmented generation (RAG) combines a search or retrieval step with a language model. The system finds potentially relevant passages from a selected collection, then uses them as context for a generated response. Retrieval can improve traceability and freshness, but cannot ensure that the collection is complete or that the answer faithfully uses the sources.

How it works
- 01Select authoritative documents and record their owner, date, and access rules.
- 02Index passages with metadata and a retrieval method appropriate to the collection.
- 03Retrieve candidate evidence for a query and expose the source documents to the model and user.
- 04Evaluate retrieval coverage, answer support, permissions, and refusal behavior using realistic questions.
- 01
Select authoritative documents and record their owner, date, and access rules.
- 02
Index passages with metadata and a retrieval method appropriate to the collection.
- 03
Retrieve candidate evidence for a query and expose the source documents to the model and user.
- 04
Evaluate retrieval coverage, answer support, permissions, and refusal behavior using realistic questions.
Why it matters
City information changes and is distributed across departments. RAG can connect questions to source material, but poor indexing, superseded policies, or irrelevant passages may produce misleading answers. Document lifecycle management matters as much as model choice.
Typical Smart City applications
- Search over current public service guidance
- Internal staff policy lookup
- Planning-document discovery
- Source-linked summaries for editor review
Example data inputs
Strengths
- Can link responses to selected source material
- Can refresh content by updating the document index
- Can limit answers to an approved collection
Limitations and risks
- Retrieval can miss relevant or current documents.
- A generated response can distort or overstate retrieved evidence.
- Permissions and personal data controls must carry through indexing and logs.
Illustrative workflow
Applied city example
A permitting office builds a searchable assistant over current public guidance. It displays the exact retrieved sections and publication dates, declines unsupported questions, and routes ambiguous cases to the permitting team.
Related methods
- Large language models
- Natural language processing
- AI agents
Frequently asked questions
Does RAG eliminate hallucinations?
No. It can provide evidence context, but retrieval and generation both fail and need evaluation.
Can any web page be included in the index?
No. Source authority, rights, privacy, update schedules, and permissions should be reviewed first.
What should users see?
Relevant source passages, dates, links, and a clear route to human support when evidence is missing.