Hybrid semantic + keyword code search in Atlas finds relevant code by combining both the meaning and the exact text of your query, fusing these distinct retrieval methods into a single, highly ranked result set. Atlas achieves this by indexing code using AST declarations via tree-sitter and then applying reciprocal rank fusion to merge semantic and keyword search outcomes.
What is hybrid code search in Atlas?
Atlas's hybrid semantic + keyword code search, available in 2026, is a retrieval system that intelligently combines two powerful methods to locate code: understanding its meaning and matching specific text. This fusion ensures a more comprehensive and accurate search experience than either method alone.
Atlas's hybrid search capability is designed to overcome the limitations of traditional keyword-only searches and purely semantic approaches. It operates by simultaneously performing a semantic search, which understands the conceptual intent behind a query, and a keyword search, which identifies exact textual matches. The results from both these distinct retrieval mechanisms are then combined and re-ranked using a technique called reciprocal rank fusion. This process allows Atlas to surface code snippets that are semantically similar to the query, even if they do not contain the exact keywords, while also ensuring that precise keyword matches are not overlooked. The system is built upon an index of code created by parsing AST declarations using tree-sitter, providing a structured understanding of the codebase.
How does Atlas index code for search?
Atlas indexes code for its hybrid search by analyzing AST declarations using tree-sitter, a robust parsing library, rather than relying on arbitrary line windows. This method provides a precise structural understanding of your codebase, ensuring that 100% of relevant declarations are considered for indexing.
Atlas builds its code index by processing the Abstract Syntax Tree (AST) declarations of your codebase. This is achieved using tree-sitter, a parser generator tool that provides a detailed, language-aware understanding of code structure. Unlike systems that might index code in blind, fixed-size line windows, Atlas's approach focuses on meaningful code constructs like functions, classes, and variables. This granular, declaration-based indexing allows for more accurate and contextually relevant retrieval. Furthermore, Atlas can build its code index with local Ollama embeddings. This means that the semantic representations of your code, crucial for the semantic part of the hybrid search, are generated and stored locally, keeping your proprietary code off third-party servers and enhancing data privacy.
How does Atlas combine semantic and keyword results?
Atlas combines semantic and keyword search results using reciprocal rank fusion, a sophisticated algorithm that merges rankings from multiple retrieval methods into a single, unified list. This process ensures that both conceptual relevance and exact textual matches contribute to the final 2026 search outcome, providing a balanced and effective result.
The core mechanism for fusing the two search types in Atlas is reciprocal rank fusion. When a search query is issued, Atlas performs two parallel searches: one semantic and one keyword-based. The semantic search leverages the locally generated Ollama embeddings to find code snippets that are conceptually similar to the query, regardless of exact word choice. Concurrently, a keyword search identifies code segments containing the specified terms. Each search method produces its own ranked list of results. Reciprocal rank fusion then takes these individual rankings and combines them into a single, consolidated list. This fusion algorithm gives higher weight to items that appear high in multiple individual rankings, effectively balancing the strengths of both semantic understanding and precise keyword matching to produce a comprehensive and highly relevant set of search results.
What does hybrid search look like in an Atlas session?
In an Atlas session, using hybrid semantic + keyword code search integrates direct into your workflow, allowing you to query your codebase for specific functionality or concepts. For example, you might ask Atlas to 'find the 2026 authentication logic' or 'show me the user creation flow,' and it will return relevant code.
When you interact with Atlas, its hybrid search capability is implicitly leveraged by the agent when it needs to locate relevant code. For instance, if you instruct Atlas to "implement a new user authentication method," the agent will use its `SearchEngine.search` tool to query the codebase. This query will trigger the hybrid semantic and keyword retrieval process, drawing on the indexed AST declarations and Ollama embeddings. The results, fused by reciprocal rank fusion, are then presented to the agent. Atlas's plan agent, which drafts a plan in a read-only state, would then incorporate these search results into its proposed actions. Every Atlas tool call, including search, is permission-gated against allow, ask, and deny rules, ensuring you maintain control over what actions Atlas takes based on its search findings.
Frequently asked questions
- How does Atlas ensure code privacy during search?
- Atlas ensures code privacy by building its code index with local Ollama embeddings. This means that the semantic representations of your code, essential for the semantic search component, are generated and stored entirely on your local machine, preventing your code from being sent to third-party servers.
- What is reciprocal rank fusion and why does Atlas use it?
- Reciprocal rank fusion is an algorithm Atlas uses to combine the ranked results from its semantic and keyword search components into a single, unified ranking. Atlas uses it because it effectively balances the strengths of both conceptual understanding and exact textual matching, leading to more comprehensive and relevant search results.
- Does Atlas search non-code files or just code?
- Atlas's hybrid semantic + keyword code search is specifically designed for code. It indexes code by AST declarations using tree-sitter, focusing on the structural and semantic content of programming files, not arbitrary non-code files or file path patterns.
- Can I control what Atlas searches or acts upon?
- Yes, you maintain control. Every Atlas tool call, including its search functions, is permission-gated against allow, ask, and deny rules. This ensures that you approve or deny actions Atlas proposes based on its search findings before they are executed.
- How does Atlas understand the meaning of my code for search?
- Atlas understands the meaning of your code by building its index with local Ollama embeddings. These embeddings create vector representations of code snippets based on their semantic content, allowing Atlas to find conceptually similar code even without exact keyword matches.
- Is Atlas's search capability open source?
- Atlas is proprietary with a FREE CORE. While it is extensible through plugins and offers a robust TUI, its core search capability, like other verified Atlas features, is not open source, source-available, or auditable.
- How does Atlas's search differ from a simple text search?
- Atlas's search differs significantly from a simple text search by combining keyword matching with semantic understanding. A simple text search only finds exact word matches, whereas Atlas also identifies code based on its meaning, even if different words are used, thanks to its use of local Ollama embeddings and reciprocal rank fusion.
- What role does tree-sitter play in Atlas's code search?
- Tree-sitter plays a crucial role by enabling Atlas to index code by AST declarations. This means Atlas understands the structural components of your code, like functions and classes, rather than just treating it as plain text, leading to more precise and context-aware search results.
Try Atlas in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install AtlasRelated guides
Atlas with Ollama Cloud in 2026: Hosted Ollama Tags for a Terminal Coding Agent
How to run Atlas on Ollama Cloud in 2026: same local tags like qwen3-coder:480b on hosted GPUs, up to 1,048,576 tokens of context, no published per-token price.
Atlas with Qwen3.7 Max: Alibaba's May 2026 Frontier Tier at $2.50 / $7.50
Qwen3.7 Max in Atlas: Alibaba's May 2026 flagship, a 1M context model at $2.50 / $7.50 per Mtok, or $1.25 / $3.75 through Together. Setup with DASHSCOPE_API_KEY.
Atlas with Mistral Large 3 (2512): Big Diffs, EU Hosted, 2026
Mistral Large 3 (2512) drives Atlas with a 262,144 token context and a matching 262,144 token output at $0.50 / 1M input tokens and $1.50 / 1M output tokens.
Atlas with Gemini 3.1 Flash Lite: The $0.25 Small Model Slot in 2026
Gemini 3.1 Flash Lite in Atlas: 1,048,576 tokens of context at $0.25 / $1.50 per Mtok, wired to the small_model slot in atlas.json. Setup, limits, and tradeoffs.
Atlas with Command R 35B (Ollama): A RAG-Native Model for Retrieval-Heavy Work in 2026
Run Atlas on Command R 35B (Ollama): Cohere's 19GB RAG and tool-use model with a 128K context, free self-hosted. Check the research license before commercial use.
Atlas for TensorFlow: Terminal-Native AI Coding for Keras 3 and tf.data in 2026
Atlas is a terminal-native AI coding agent for TensorFlow and Keras 3 in 2026, where tf.function graph tracing and tf.data pipelines are what make training fast.
Atlas vs Devin: AI Coding Agents Compared for 2026
Atlas and Devin offer distinct AI coding experiences in 2026. Atlas provides a terminal-native TUI with local control, while Devin is a cloud-managed engineer with SWE-1.7.
Atlas with Mistral Small 3.2 (local via Ollama) in 2026
Run Atlas on Mistral Small 3.2 (local via Ollama) in 2026: a 15GB pull, Free (self-hosted), 128,000 tokens of context, and function-calling tuned 2506 weights.