Structure-based search explores information through its existing organization. Folders, filenames, directory hierarchies, and code symbols act as meaningful metadata, allowing an agent to narrow its search without complex retrieval algorithms. section 5.2.4 section 5.6
A practical exploration flow is:
- Inspect the top-level tree to understand the available folders and files. section 5.2.4
- Use filenames, folder names, grep, or IDE search to locate related files and symbols. section 5.2.4
- Read only the selected files or relevant portions, then expand exploration when the evidence requires it. section 5.2.4
Exploring a codebase
An agent begins with tree, checks directories such as src/, tests/, and docs/, searches for get_user_by_id, and opens the defining and calling files. The same pattern applies to extracted GAIA archives: inspect folders, infer relevance from filenames, and confirm contents. section 5.2.4 section 5.4.1
Table 5.1 Recommended search methods by situation
| Situation |
Recommended method |
Reason |
|---|---|---|
| Exact word/code search |
Keyword search |
Exact matching needed for |
| Natural language questions |
Vector search |
Semantic search needed for queries like “how to store data” |
| Relationship-based questions |
Graph search |
Relationship traversal needed for “code that calls this function” |
| Folder/file structure exploration |
Structure-based search |
When structure itself is information, like zip files or codebases |
| Production environments |
Hybrid search |
Combines the advantages of multiple methods |
Compare structure-based search with keyword, vector, graph, and hybrid search by situation and retrieval need. section 5.2.4
