AI Tour Guide Architecture: Building a Dedicated Knowledge Base for Museum Navigation

    This article explains how to build a reliable AI museum guide on top of a general-purpose large language model by separating knowledge from model parameters. It covers why general LLMs fall short in high-accuracy, long-tail, on-site scenarios, how to translate product goals into measurable metrics, and a four-layer architecture that isolates access, orchestration, knowledge indexing, and model infrastructure. The core sections detail the knowledge base pipeline—multi-source ingestion, structured metadata, hierarchical chunking, and versioned indexing—along with hybrid retrieval, reranking, context budgeting, prompt constraints, and citation verification. It also addresses evaluation, cost control, common pitfalls, and deployment using Baidu AI Cloud capabilities.

    1. Why General-Purpose LLMs Are Not Enough for Museum Guides

    Museum navigation is a scenario that demands high accuracy, covers dense long-tail knowledge, and involves strong on-site interaction. Visitor questions are often very specific: the evidence used to date an artifact, how a decorative motif evolved across regions, the materials used during restoration, or the visitor route through a gallery and the closing time. General-purpose LLMs offer strong language organization and multi-turn dialogue, but their parametric knowledge has three inherent weaknesses.

    The first is uneven coverage. Popular exhibits are described repeatedly, while permanent collections in storage and supplementary notes for temporary exhibitions have sparse source material, so the model tends to say something confidently but incorrectly. The second is stale information. Temporary exhibition changes, opening-hour adjustments, and guide-session schedule changes are high-frequency updates that cannot be synchronized through retraining. The third is the lack of traceability. When a guide makes a mistake on-site, there is no budget for correction, and visitors lose trust immediately.

    The common industry approach is therefore to decouple knowledge from model parameters and place it in an external, searchable, versionable knowledge base, leaving the model responsible only for understanding intent, organizing language, and controlling the pace of interaction. This pattern is commonly known as retrieval-augmented generation (RAG). Its value is not in making the model “smarter,” but in making every output traceable to a source.

    2. Breaking Down the Target Capabilities

    Before implementation, it helps to translate product goals into verifiable technical metrics to avoid rework later.

    • Accuracy: factual statements in answers must map to knowledge base chunks and include provenance (exhibit number, gallery location, document version).
    • Coverage: first-answer hit rate across three question types—permanent exhibitions, temporary exhibitions, and general visitor information.
    • Refusal capability: when the knowledge base has no supporting evidence, clearly state that no definitive information is available and offer an alternative path (recommend the information desk or related exhibits).
    • Interaction experience: time to first token, single-turn duration, and suitability for voice broadcast.
    • Operability: latency from content update to live effect, plus rollback capability.

    Refusal capability is the easiest to overlook, yet it sets the floor for the system. A guide assistant that can say “I don’t know” has more long-term value than one that answers everything.

    3. Overall Architecture: Four Separated Layers

    A four-layer structure is recommended, with explicit contracts between layers so each can evolve independently.

    1. Access layer: unified onboarding for multiple clients such as mini programs, on-site large screens, and voice guide devices. It handles session identification, location context (gallery code), and multimodal input (speech transcription, photo recognition of exhibit identifiers).
    2. Orchestration layer: intent recognition and routing, multi-turn state management, retrieval calls, reranking, prompt assembly, citation verification, and fallback strategies.
    3. Knowledge and indexing layer: document parsing, chunking, vector and keyword indexing, metadata management, versioning, and canary release.
    4. Model and infrastructure layer: inference services for the general-purpose LLM, plus common cloud capabilities such as object storage, message queues, container platforms, logging, and monitoring with alerting.

    This separation brings a direct benefit: when the underlying model is swapped, the knowledge assets and orchestration logic need no rewrite; when the guiding style changes, only the prompt templates and a few parameters need adjustment.

    4. Building the Dedicated Knowledge Base

    The quality ceiling of the knowledge base determines the quality ceiling of the whole system. It is best governed as a data pipeline.

    4.1 Multi-Source Ingestion and Cleaning

    Common sources include exhibition outlines, expert-written drafts, summaries of archaeological reports, restoration archives, recorded guide scripts, transcriptions of historical guide recordings, and ticketing and opening information. On ingestion, everything should be normalized into a structured intermediate format that preserves section hierarchy while removing headers, footers, and duplicated layout noise. When scanned documents require optical character recognition, confidence scores should be retained, and low-confidence passages should enter a manual review queue.

    4.2 Structured Metadata Design

    Chunks must carry more than body text; metadata is the basis for later filtering and citation. A usable minimal field set is:

    1. {
    2. "doc_id": "permanent-2024-v3",
    3. "chunk_id": "c-0187",
    4. "exhibit_no": "B2-014",
    5. "hall": "Bronze Gallery",
    6. "category": "permanent exhibition",
    7. "topic": ["motifs", "casting techniques"],
    8. "period": "late Shang dynasty",
    9. "confidence": 0.93,
    10. "version": 3,
    11. "effective_from": "2024-05-01"
    12. }

    With hall and exhibit_no, the system can combine on-site positioning to deliver “nearby explanations.” With version and effective_from, it can support canary releases and rollback.

    4.3 Chunking Strategy

    Fixed-length splitting is simple to implement but tends to cut off a “conclusion” from its “evidence.” A more robust approach is hierarchical chunking: first split by section into large blocks for recall, then split semantically into smaller passages within each block for reranking and citation, with a mapping between parent and child blocks. For artifact entries, the recommended granularity is one logical unit per exhibit, managing name, era, material, dimensions, provenance, and interpretation together, so the same fact is not scattered across multiple chunks and does not create conflicts.

    4.4 Indexing and Updates

    The vector index handles semantic similarity, while the keyword index handles exact matching for proper nouns, numbers, and dates; both run in parallel and their results are fused. The update pipeline should be asynchronous via a message queue: once an editor submits content, it triggers parsing and rebuild tasks; after the build completes, the new version is switched in by version number, and on failure the previous version keeps serving.

    5. Key Design for Retrieval and Generation

    5.1 Hybrid Retrieval and Reranking

    A single vector recall path handles poorly questions that contain numbers and proper nouns, such as “Tell me about the object with a taotie motif in display case B2-014.” In practice, two recall paths run in parallel, then a cross-encoder-style reranking model scores the candidates, and the top few chunks enter the context. Fusion can use a robust, parameter-free method such as reciprocal rank fusion:

    1. def rrf(rankings, k=60):
    2. scores = {}
    3. for ranking in rankings:
    4. for rank, doc_id in enumerate(ranking, start=1):
    5. scores[doc_id] = scores.get(doc_id, 0.0) + 1.0 / (k + rank)
    6. return sorted(scores.items(), key=lambda x: -x[1])

    5.2 Context Budget and Conflict Handling

    The context window is a scarce resource and should be allocated by priority: general information < exhibit interpretation < academic debate. When chunks reach conflicting conclusions, do not let the model decide freely; the orchestration layer should select based on version and effective_from, and the answer should note the source version.

    5.3 Prompt and Citation Constraints

    The prompt should state both what can and cannot be said, and enforce structured output for front-end rendering and automated validation:

    1. You are a museum guide assistant.
    2. Rules:
    3. 1. Answer only from the material in <context>; do not supplement facts from parametric memory;
    4. 2. Mark the source chunk_id after each factual conclusion;
    5. 3. When material is insufficient, reply "No definitive information is available" and give one alternative suggestion;
    6. 4. Address general visitors, avoid unexplained technical terms, and keep each paragraph to no more than three sentences.
    7. <context>{{retrieved_chunks}}</context>
    8. <question>{{user_query}}</question>

    5.4 Citation Verification and Fallback

    Before a generated result is broadcast, add a lightweight check: extract the chunk_ids in the answer and verify they exist and that each sentence is semantically consistent with its cited chunk. If verification fails, trigger a downgrade—return an extractive summary with sources, or hand off to a human. This step blocks most hallucinations at very low engineering cost.

    Example flow:

    1. def answer(query, hall):
    2. chunks = retrieve(query, hall_filter=hall)
    3. if not chunks:
    4. return fallback_reply()
    5. draft = llm_generate(query, chunks)
    6. if not verify_citations(draft, chunks):
    7. return extractive_summary(chunks)
    8. return draft

    6. Accuracy, Evaluation, and Cost

    The evaluation set should come from real question logs, sampled in layers across four categories—factual questions, comparison questions, time-sensitive questions, and unanswerable questions—annotated with reference answers and required points. Metrics should include factual accuracy, citation verifiability, correct refusal rate, and average latency, and any prompt or chunking change should run the same regression suite.

    For cost control, a small model can first classify intent and filter obvious chitchat before retrieval and the LLM run; a semantic cache can serve high-frequency questions directly while retaining sources; and streaming output can improve the experience for long explanations. Logging and monitoring should cover retrieval hit distribution, zero-recall rate, and downgrade trigger rate, which often reveal knowledge base gaps earlier than accuracy does.

    7. Common Pitfalls

    • Stuffing all documents into the context at once, diluting key information.
    • Missing metadata, making gallery filtering impossible and causing off-topic answers on-site.
    • No versioning mechanism, so outdated content is still presented after a temporary exhibition closes.
    • Evaluating only whether answers “sound right,” not whether sources can be checked.
    • Ignoring voice scenarios, where long sentences and parenthetical notes broadcast poorly.

    8. Summary

    The engineering focus of a smart museum guide is not the size of the model parameters, but turning knowledge into a governable, searchable, traceable asset. A layered architecture isolates change, structured metadata supports filtering and citation, hybrid retrieval with reranking improves recall quality, and citation verification contains hallucinations; combined with regression evaluation and caching, this builds a stable, trustworthy on-site guiding experience on top of a general-purpose LLM. To support multi-client concurrency and continuous content updates, deployment and operations can rely on common capabilities such as object storage, message queues, container platforms, and monitoring with alerting from Baidu AI Cloud.