S4.10 - Retrieval_query_and_index_ID

S4.10 ? Retrieval query and index ID

flowchart LR
    A[Traditional limitation:
citations visible but retrieval context hidden] --> B[RAIDT:
run-level evidence framework] B --> C[[Retrieval query and index ID]] H[Practical fields:
query string
rewritten query
collection or snapshot ID
vector index version
retrieval timestamp] --> C C --> D[Evidence pack:
retrieval provenance recorded] C --> E[RAIDT score profile:
Auditability Traceability Dependability] D --> F[Reviewer reconstruction
and contestability] E --> G[Governance readiness
organisational learning
policy alignment]

? Star S4 - Evidence Architecture and Artefacts

Star context: Specifies the concrete fields and artefacts that make a run record inspectable, reconstructable, and reviewable within RAIDT's evidence architecture.


Academic picture
Definition / background

Retrieval query and index ID are run-level evidence fields used when a generative AI system relies on retrieval-augmented generation, search, or any other external knowledge lookup. The retrieval query records the actual search request sent to the retrieval component. The index ID records the specific source space that was searched, such as a named document collection, a vector database snapshot, a policy library build, or another stable retrieval target. In combination, they show both what the system asked and where it looked.

Conceptually, this item sits between prompt evidence and source evidence. It is not the same as the user prompt, because the user prompt may be transformed into one or more internal retrieval queries. It is also not the same as final citations, because citations describe what appears in the answer, whereas retrieval provenance describes the source space and search event that informed generation. A system can produce polished citations while still leaving uncertainty about whether the correct corpus, snapshot, or search parameters were used.

In GenAI governance, this distinction matters because retrieval is often treated as a hidden implementation detail. RAIDT makes it explicit. If the run is the unit of governance, then the retrieval event inside that run must also be evidenced. Recording retrieval query and index ID allows a reviewer to inspect grounding conditions, compare runs executed against different knowledge bases, and test whether an answer was produced from the intended informational environment.

Within RAIDT, this item therefore belongs inside the run-level evidence pack. It contributes particularly strongly to Auditability and Traceability, while also supporting Dependability and Responsibility when organisations must show that staff were guided by the right knowledge source at the right time. It also improves interpretive clarity, because reviewers can separate failures caused by prompting, model behaviour, and retrieval configuration instead of collapsing them into one vague explanation.

Why this concept matters

This concept matters because retrieval-based systems can appear trustworthy while remaining evidentially weak. Without the retrieval query and index ID, an organisation may know that a model produced an answer, yet still be unable to show what corpus it searched, whether the corpus was current, or whether the retrieval step was appropriately targeted. That weakens review, challenge, and remediation.

Capturing these fields solves a practical governance problem. It prevents teams from relying on vague claims such as "the model searched the knowledge base" or "the answer was grounded in internal documents" without a reconstructable record of what actually happened. It also reduces confusion between three different layers of evidence: what the user asked, what the system searched, and what sources were finally cited or quoted.

If this information is missing, several risks appear. Reviewers cannot distinguish between a bad answer caused by an outdated index and a bad answer caused by poor prompting. Organisations cannot compare runs fairly across system updates. Incident investigation becomes slower and weaker because there is no stable way to reconstruct the retrieval context. In regulated or high-impact settings, this undermines claims of due care and weakens audit readiness.

RAIDT uses this item to move from principle-level governance to operational governance. Rather than asking whether retrieval is used in some general sense, RAIDT asks whether the specific retrieval event in a specific run can be evidenced, inspected, and contested.

Key idea: retrieval query and index ID matter because they turn hidden retrieval behaviour into run-level evidence that can be reviewed, compared, and governed.

What this item captures
Practical example / likely audience question

Audience question

If the final answer already includes citations, why does RAIDT also need the retrieval query and index ID?

Answer

The concern behind this question is the assumption that visible citations are enough to demonstrate grounding. They are not. Citations usually show what the answer refers to after generation, but they do not necessarily show what the system searched, which collection it searched, whether the collection was the correct one, or whether the retrieval environment had changed since an earlier run.

The direct answer is that citations are output-level artefacts, whereas retrieval query and index ID are process-level evidence. RAIDT needs both. If a staff-facing assistant answers a question about procurement rules and cites a policy PDF, a reviewer still needs to know whether the system searched the current procurement index or an outdated archive, and whether the query that drove retrieval was narrow, broad, or mis-specified.

A practical example makes the difference clearer. Suppose two runs cite the same document title, but one run queried the current compliance index and the other queried a legacy archive. The answers may look similar, yet the governance significance is different. RAIDT handles this better than a generic AI governance approach because it ties the answer to the exact run configuration and retrieval evidence, allowing reconstruction rather than inference.

Practical example in RAIDT terms

Consider a hospital using a GenAI assistant to help clinical administrators draft discharge summaries that must align with current local guidance. In one run, the operator asks for discharge advice for an adult asthma patient. The system converts that request into a retrieval query such as "adult asthma discharge criteria local protocol follow-up medication safety" and searches index respiratory_policy_index_2026_04_15.

The run-level issue is not simply whether the answer looks plausible. The real governance question is whether the answer was grounded in the correct knowledge environment. If a later review finds that the output omitted an updated follow-up requirement, RAIDT needs evidence showing whether the failure came from the model, the query transformation, or the fact that the run used an index that had not yet incorporated the newest protocol update.

The evidence needed would include the retrieval query, the index ID, the timestamp, the run ID, the model identifier, and the retrieved document IDs and hashes. The most affected RAIDT pillars are Auditability, Dependability, and Traceability, with Responsibility also engaged because the organisation must show reasonable control over the knowledge source used in a clinically consequential workflow. Recording this item improves governance readiness because it lets the hospital reconstruct the retrieval context during supervision, incident review, and policy assurance.

Detailed link to RAIDT

Retrieval query and index ID link to RAIDT in four ways.

First, they support RAIDT's core idea that governance should attach to the run rather than to abstract system claims.
Second, they make one crucial part of the run inspectable by showing what source space was queried and under which retrieval context.
Third, they strengthen the evidence pack and the score profile by giving reviewers concrete retrieval provenance rather than relying on output appearance alone.
Fourth, they support reviewability, contestability, audit readiness, and organisational learning because failures can be traced back to retrieval conditions instead of being treated as unexplained model behaviour.

Retrieval query and index ID ? Run-level evidence ? Evidence pack ? RAIDT score profile ? Governance readiness

In other words, this item operationalises the relationship between external knowledge access and accountable AI use. It gives RAIDT a practical way to examine whether grounding was merely claimed or actually evidenced.

Link to the five RAIDT pillars

Responsibility

This item supports Responsibility by showing whether the organisation directed the system towards an appropriate and governed knowledge source for the task at hand. It helps demonstrate that reliance on retrieval was not careless or undefined.

Example evidence / implication:

Auditability

This item has a strong effect on Auditability because it creates an inspectable record of the retrieval step. Auditors can assess not only the answer but also the source environment that informed it.

Example evidence / implication:

Interpretability

This item contributes to Interpretability by separating retrieval behaviour from prompt behaviour and generation behaviour. That improves explanation quality when stakeholders ask why a particular answer emerged.

Example evidence / implication:

Dependability

This item supports Dependability because reliable system performance depends on stable and appropriate grounding conditions. If the index is wrong or outdated, dependable output is unlikely even when the model itself is unchanged.

Example evidence / implication:

Traceability

This item has a very strong effect on Traceability because it links the run to the retrieval environment that fed generation. It is one of the clearest bridges between process evidence and source evidence.

Example evidence / implication:

Why this item is more than a generic concept

In general AI governance, retrieval may be described loosely as a grounding mechanism or knowledge access feature. That framing is useful but incomplete. It does not by itself create evidence that a specific run searched a specific corpus in a specific way.

In RAIDT, retrieval query and index ID mean a concrete, reviewable run record. The RAIDT meaning is more operational because it is tied to run-level evidence, connected to other artefacts in the evidence pack, and usable in scoring, reconstruction, and organisational review. The concept therefore shifts from architectural description to governance instrumentation.

Common misunderstanding

Misunderstanding

If the system uses a trusted internal knowledge base, the exact retrieval query and index ID do not need to be logged.

Correction

Trust in the source does not remove the need for evidence about access to that source. A trusted corpus can still be queried badly, searched through the wrong collection, or accessed through an outdated snapshot. For example, a legal support assistant may rely on an approved internal repository, yet still retrieve from the employment-law archive instead of the procurement-law archive because the index selection logic was misconfigured. Logging the retrieval query and index ID makes that mistake visible. RAIDT therefore treats trusted sources as a reason to evidence retrieval properly, not a reason to skip it.

Boundary and limitation

This item does not prove that the retrieved materials were the best possible materials, that the model interpreted them correctly, or that the final answer used them faithfully. It also does not replace the need to record retrieved document IDs, hashes, timestamps, prompting context, review decisions, or output artefacts.

Its usefulness depends on stable identifiers and disciplined index management. If an organisation reuses the same index label after rebuilding the corpus, the index ID will not support meaningful reconstruction. Likewise, if query rewriting happens internally but only the user prompt is stored, the retrieval record remains incomplete.

RAIDT handles this limitation by treating retrieval query and index ID as necessary but not sufficient evidence. They work best when paired with adjacent items such as S4.11 ? Retrieved document IDs and hashes, S4.02 ? Timestamp, S4.12 ? Tool-chain trace, and S4.15 ? Output hash.

Implementation levels

Manual implementation

A researcher or small team can record the retrieval query and index ID in a structured run sheet or evidence template immediately after each important run. This is feasible for pilot studies, viva demonstrations, and small-scale governance trials, although it depends on disciplined manual capture.

Semi-automated implementation

A semi-automated approach uses prompts, wrappers, forms, or logging templates that automatically populate standard metadata fields while still allowing human confirmation. For example, a RAG interface may expose the generated retrieval query and selected index name to the operator before the evidence pack is saved.

Fully automated implementation

At scale, a platform, orchestration layer, or governance pipeline should log retrieval queries and stable index identifiers automatically for every run. In a mature implementation, these fields are written directly into the evidence pack, linked to run IDs and retrieved document hashes, surfaced in dashboards, and made available for review workflows, scoring, and incident investigation.

Practical use in the RAIDT project

Within the RAIDT project, this item is useful across conceptual, empirical, and policy-facing outputs. In Paper 08 Foundations, it helps explain why evidence architecture must include retrieval provenance rather than only prompts and outputs. In Paper 09 Empirical Validation, it gives reviewers a concrete basis for testing whether independent assessors can reconstruct retrieval conditions and judge governance quality consistently. In Paper 10 Policy Pathways, it supports a policy argument for auditable procurement and deployment standards in retrieval-based GenAI systems.

It also matters for sector playbooks because many real organisational deployments depend on internal document retrieval rather than pure language-model generation. In the evidence pack, it helps structure the retrieval section. In the scoring rubric, it provides assessable indicators for Auditability and Traceability. In governance interventions, it supports incident review, system comparison, and change control when corpora or search pipelines are updated.

For supervision meetings, viva defence, and journal positioning, this item is especially useful because it offers a precise answer to a common challenge: how does RAIDT make RAG governance more concrete than broad principles-based AI governance? The answer is that RAIDT requires the retrieval event itself to become evidence.

Key audience questions to prepare for

Q1. Why is the retrieval query not simply the same as the user prompt?

Because many systems transform the user prompt into one or more internal search requests. Governance needs the actual retrieval query used by the system, not only the user's original wording.

Q2. Why is the index ID necessary if the organisation only has one knowledge base?

Because knowledge bases change over time even when they appear singular. The index ID shows which version, snapshot, or collection was searched in that specific run.

Q3. Does this item prove that the answer was correct?

No. It proves part of the retrieval context. Correctness still depends on source quality, retrieval quality, model behaviour, and human review.

Q4. Which RAIDT pillars are most affected by this item?

It most strongly affects Auditability and Traceability, with substantial implications for Dependability and Responsibility and a supporting role for Interpretability.

Q5. How would this help in a contested organisational decision?

It allows reviewers to reconstruct whether the system searched the right corpus under the right conditions, which is essential when decisions are challenged or when incidents must be investigated fairly.

Suggested citation concepts to support this item
Short explanation for presentation

Retrieval query and index ID are the fields that show what a RAG-enabled system searched and where it searched during a specific run. In RAIDT, that matters because governance attaches to the run, not to a general claim that the model was "grounded". If we only keep the prompt and the final answer, we still cannot tell whether the system queried the right knowledge base, used the current snapshot, or searched with an overly narrow or distorted query. By recording the retrieval query and the index ID, RAIDT makes the retrieval step inspectable. That improves audit reconstruction, explains why outputs differ across runs, and helps organisations distinguish model problems from retrieval problems. It is therefore a small field with a large governance effect.

One-line takeaway

Retrieval query and index ID are the run-level record of what a GenAI system searched and where it searched, because RAIDT treats retrieval provenance as evidence rather than assumption.

Related items in evidence architecture and artefacts
Anchored questions
Powered by Forestry.md