JetBrains Outlines RAG Architecture Behind Its Air Context Code Search Engine
The software tools vendor detailed the parsing, chunking, and vector storage trade-offs required to enable semantic search for AI coding agents.

Software tools provider JetBrains has detailed the technical architecture behind Air Context, its retrieval-augmented generation (RAG) platform designed to provide artificial intelligence coding agents with precise semantic code search capabilities. In technical documentation shared via Hacker News (https://blog.jetbrains.com/ai/2026/09/building-a-rag-pipeline-for-semantic-code-search-a-developer-diary-and-field-notes/), the company outlined the engineering challenges of moving from simple RAG prototypes to a production-grade enterprise system capable of searching massive software repositories.
As software development increasingly relies on automated agents, traditional code discovery methods like keyword search and grep have proven insufficient. These legacy tools require agents to know exact strings in advance, making it difficult to locate relevant code based on broader functional intent, such as identifying where token refresh operations occur. Air Context addresses this limitation by indexing code semantics, allowing agents to query repositories using natural language requests.
To process code efficiently, Air Context relies on the JetBrains Code Engine, a proprietary platform incorporating parser logic refined over 26 years of software development tool creation. The system uses structure-aware chunking to parse raw source files into syntactic units rather than relying solely on fixed-length line splits. This approach ensures that related code constructs stay intact while preventing single large files or isolated syntax lines from overwhelming language models.
Air Context currently features specialized syntax parsing and chunking for nine primary programming languages: Kotlin, Java, Python, JavaScript, TypeScript, C#, PHP, Go, and Rust. For files written in other languages, the system falls back to basic line-based splitting to guarantee universal indexing support. The pipeline also includes a normalization step that strips away semantically redundant metadata, such as Java annotations like @NotNull and @Override, before code fragments are prepared for embedding alongside relative file paths.
JetBrains noted similarities between its chunking method and the cAST architecture published by Zhang et al. in 2025. However, the company emphasized that Air Context integrates deeper language-specific rules, such as pairing Python decorators directly with function definitions and linking KDoc blocks to Kotlin declarations. To ensure boundary accuracy during pipeline updates, JetBrains employs an LLM-as-a-judge review strategy paired with comprehensive end-to-end retrieval testing.
Following pre-processing, code chunks undergo vectorization, transforming text into high-dimensional numerical arrays where semantic similarity correlates with geometric distance. JetBrains highlighted that at enterprise scale, vector storage costs quickly become a governing constraint. A standard vector with several thousand dimensions expressed in 32-bit floats consumes approximately 16 kilobytes, causing indexes for repositories with millions of chunks to balloon into tens of gigabytes before accounting for metadata overhead.
To optimize memory efficiency, JetBrains evaluated trade-offs between reducing vector dimensionality and lowering bit-precision per dimension. In testing under a strict allocation limit of 512 bytes per vector, retaining 4,096 dimensions at 1-bit precision yielded significantly higher retrieval accuracy than preserving 128 dimensions at full 32-bit precision. JetBrains explained that maintaining a broader breadth of semantic feature dimensions delivers superior search results compared to storing high-precision floating-point data over a truncated set of dimensions.
Sources
Written by
The Company Wire
Inside the companies building what’s next. Reporting on startups, technology, funding and the people shaping them.


