AskON: Turning Code into a Searchable Knowledge Asset
Key point
AskON uses RAG and graphs to let developers search code's business context in natural language.
Details
AskON is a RAG-based code knowledge platform that structurally indexes large codebases, turning the code itself into searchable knowledge. It started from the need to answer questions like "How is this policy implemented in the code?" in environments where documentation is missing or outdated.
The knowledge base is built in two main stages. First, in /askon-prepare, a specific branch of a Git repository is cloned, then extracted at the method level; code with little semantic value and simple getters/setters are excluded based on a complexity score, and a calls/calledBy call graph is built. During this process, metadata such as method signatures, package/class information, external dependencies, code paths, compressed source, and commit hashes are organized together.
Then, in /askon-process, only the raw code is fed into the LLM to generate method role summaries and key business rules, which are embedded and stored in a vector DB. In environments like the Lotte ON order service, which has many abbreviations and domain terms, a separate glossary is injected into the prompt to improve analysis quality. When storing, the summary token count and model name are also recorded, which are used for tracking operational cost and quality.
Question answering works in the order of question embedding → vector search → context expansion via the call graph → LLM answer generation. It is used in Slack in two ways: general users use @AskON [module] question to get explanations with technical jargon stripped away, while developers use /askon [module] question to check file, class, and method locations as well.
Graph expansion and ranking calibration were also added to improve search quality.
- Structural questions ask about flow, such as "call flow" or "where is this called from", so the number of references per hit is limited to prioritize depth.
- Rule questions ask about conditions, such as "what is validated" or "what is the policy content", so only the total number of references is limited to broadly gather related methods.
- After vector search, controller is excluded and service is favored, items with empty called_by are removed from candidates, and code length is also factored into the calibration.
The problem of code changing after deployment is solved with /askon-pull. The initial indexing is done via clone, and afterward only recent commits are checked via the GitLab API, with only changed classes re-run through prepare/process — so the knowledge base can be updated to the latest code without re-reading the entire repository.
Proposed directions for improvement include building a dataset for evaluating search quality, personalized ranking that reflects user context, a Query Memory that accumulates repeated questions, and a transition to GraphDB. Ultimately, the core is not a perfect general-purpose design, but having someone with domain understanding define the right unit and rules for each codebase, so that RAG can be run realistically.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.