Self-Describing Structured Data with Dual-Layer Guidance: A Lightweight Alternative to RAG for Precision Retrieval in Large-Scale LLM Knowledge Navigation
Large Language Models (LLMs) exhibit a well-documented positional bias when processing long input contexts: information in the middle of a context window receives substantially less attention than content at the boundaries, a phenomenon termed the Lost-in-the-Middle effect (Liu et al., 2024). This limits knowledge-retrieval applications that embed large structured knowledge bases directly in the LLM context. Retrieval-Augmented Generation (RAG) addresses scalability by retrieving only relevant fragments, but introduces substantial infrastructure overhead and is ill-suited to libraries whose semantic boundaries are human-defined rather than statistically learned. We propose Self-Describing Structured Retrieval (SDSR), a lightweight framework in which structured data files embed human-authored navigational metadata at the file's primacy position, thereby exploiting rather than fighting the LLM's primacy bias. We further propose a Dual-Layer Guidance strategy combining in-file metadata with explicit routing rules in the system prompt. We validate SDSR through a four-round benchmark using a 190-skill library expanded from 36 to 119 categories via adversarial distractor injection. Four conditions are tested: (A) no guidance, (B) in-file summary only, (C) prompt hint only, (D) both combined. Version D achieves 100% primary routing accuracy (20/20) at 119 categories versus 65% for the no-guidance baseline. We identify a fundamental asymmetry: primary routing is solvable by explicit rules, while secondary cross-category routing requires architectural intent explicitly encoded in the data structure. We further extend SDSR to semi-structured corpora, showing how cross-reference encoding enables operation without vector databases in domains with recoverable document structure.
Figures & tables
Target Category
Confused With
Confusion Type
Axiomatic_Logic_&_Audit_Systems
Recursive_Self_Audit_Engine
hub vs. satellite
Distributed_Cognition_&_Context_Orch.
Agent_Handoff_Protocol_Design
governance vs. mechanics
Adversarial_Systems_Thinking
Competitive_Intelligence_Synthesis
framework vs. intelligence
Academic_Research_Synthesis_Pipeline
Code_To_Methodology_Translator
pipeline vs. component
Revenue_Generation_&_Commercial_Logic
Conversion_Funnel_Architecture
system vs. mechanism
Cross_Cultural_Localization_Intelligence
Cultural_Signal_Detection
system vs. detection
Table 1: High-priority categories explicitly named in the Version D system prompt, with their commonly confused distractor categories.
Q#
Task Description (excerpt)
Primary Target Category
Q02
“…rigorously check its own output for logical contradictions and audit its own reasoning process step by step.”
Axiomatic_Logic_&_Audit_Systems
Q12
“…multi-agent AI workflow where each agent handles a different stage; context must be reliably passed between agents without loss.”
Distributed_Cognition_&_Context_Orch.
Q14
“…automatically convert experimental code results into methodology and results sections formatted for academic publication.”
Academic_Research_Synthesis_Pipeline
Q20
“…sound design AI that, given a visual scene description, can derive the corresponding sound layers and acoustic landscape structure.”
Sensory_Audio_Design
Table 2: Representative test questions (keyword avoidance enforced). Full question set in Appendix A .
Round (Categories)
A
B
C
D
Round 1 (36)
20
20
20
—
Round 2 (60)
15
16
17
—
Round 3 (119)
13
13
16
20
Table 3: Primary routing accuracy (out of 20) across all experimental conditions and rounds. Version D was evaluated in Round 3 only.
Figure 1: Primary routing accuracy as a function of library scale for all four experimental conditions. Version D achieves perfect accuracy at 119 categories. Versions A and B converge at Round 3, demonstrating the scalability limit of in-file routing hints alone.
Q#
Target Category
A
B
C
D
Recovery Layer
Q02
Axiomatic_Logic_&_Audit_Systems
×
×
×
✓
Explicit naming in prompt
Q12
Distributed_Cognition_&_Context_Orch.
×
×
×
✓
Priority rule (governance > mechanics)
Q13
Adversarial_Systems_Thinking
×
×
×
✓
Priority rule (framework > intelligence)
Q14
Academic_Research_Synthesis_Pipeline
×
×
×
✓
Priority rule (pipeline > component)
Q15
Revenue_Generation_&_Commercial_Logic
×
×
✓
✓
Explicit naming in prompt (C, D)
Q16
Cross_Cultural_Localization_Intelligence
×
✓
✓
✓
In-file routing_hint (B, C, D)
Table 4: Question-level miss recovery across conditions in Round 3. ✓= correct, × = incorrect. “Recovery layer” identifies which element of Version D resolves the miss.
Figure 2: Round 3 (119 categories) results by metric and condition. Version D achieves perfect primary accuracy but zero secondary hits, revealing the fundamental asymmetry between primary and secondary routing.
Figure 3: Per-question primary routing hit/miss matrix for Round 3 (119 categories). Green ✓= correct primary category; red × = incorrect. Questions Q02, Q12, Q13, Q14 are missed by all conditions except D, indicating persistent abstraction-level confusion unresolvable by in-file guidance or simple prompt hints.
Figure 4: The SDSR two-tier retrieval pipeline. Python reads only the _summary blocks (low cost) to identify relevant files, then loads full content (small context) for LLM processing. No vector database or embedding model is required.
Dimension
Traditional RAG
SDSR
Suitable data type
Unstructured, no pre-known boundaries
Structured, human-defined boundaries
Index type
Vector embeddings (learned)
Human-authored routing hints (explicit)
Retrieval mechanism
Cosine similarity over embedding space
LLM reads _summary blocks
Infrastructure
Vector DB (FAISS/Weaviate/Pinecone)
File system + Python
Pre-processing cost
High: chunk, embed, index (per update)
Low: author _summary (once)
Semantic boundary preservation
At risk (chunking may sever)
Guaranteed (whole-category loading)
Table 5: Comparison of SDSR versus traditional RAG across key dimensions.
Figure 5: SDSR applied to legal judgment retrieval. A one-time structuring pass converts unstructured text into an SDSR-compatible file. Cross-reference fields in the _summary block enable co-loading of dependent sections during Tier 2 retrieval.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Q#
Task Description
Primary Target
Secondary Target
Q01
“I need to design an AI assistant that, upon receiving user input, can automatically determine what type of request it is and decide what processing strategy to apply.”
Cognitive_Architecture_&_Routing
—
Q02
“Help me build an AI system that can rigorously check its own output for logical contradictions and audit its own reasoning process step by step.”
Axiomatic_Logic_&_Audit_Systems
Cognitive_Architecture
Q03
“I want an AI that, after reading an academic paper, can identify the unstated assumptions the author relies on and surface potential methodological weaknesses.”
Academic_Insight_&_Forensics
Axiomatic_Logic
Q04
“Design an interactive system for teaching elementary school students mathematics—one that dynamically adjusts difficulty based on student responses and makes the learning experience feel like a game.”
Interactive_Pedagogy_&_Gamification
Game_Design_&_Mechanics
Q05
“I need an AI to play a detective character with a complex backstory, maintaining a consistent personality and speaking style throughout interactions with users.”
Persona_&_Narrative_Synthesis
Interactive_Narrative_Engine
Q06
“Help me design a prompt system that can automatically extract structured data from messy unstructured input and convert it into a machine-readable format.”
Data_Structuring_&_Engineering
Meta_Data_&_Engineering
Appendix
Table 6: Complete 20-question test set with primary and secondary target categories. Questions are designed with keyword avoidance: no question contains a substring of its primary target category name.
Tier
Distractor Name
Target Category Confused With
High
Agent_Handoff_Protocol_Design
Distributed_Cognition_&_Context_Orchestration
High
Competitive_Intelligence_Synthesis
Adversarial_Systems_Thinking
High
Conversion_Funnel_Architecture
Revenue_Generation_&_Commercial_Logic
High
Code_To_Methodology_Translator
Academic_Research_Synthesis_Pipeline
High
Cultural_Signal_Detection
Cross_Cultural_Localization_Intelligence
High
Recursive_Self_Audit_Engine
Axiomatic_Logic_&_Audit_Systems
Appendix
Table 7: Representative distractor categories by interference tier.