Seunghyeon Ji
#AI #Search system #RAG

Coxwave's AX team operates edutap, an AI Tutor that supports the learning of online education platform users. In addition to quiz content designed to check whether learners have understood the lectures well, it also provides a chat feature where students can ask the AI about concepts they do not understand and receive real-time answers based on lecture documents. However, if the AI provides answers based on completely irrelevant documents, it ends up hindering the user's learning.

In this article, we share how we used a RAG architecture and improved search accuracy so that the AI can answer user questions based on the most appropriate documents. Rather than diving into complex theories, we have explained it simply—focusing on the actual problems we encountered and our process of solving them—so that even those unfamiliar with RAG can read it comfortably.


Understanding RAG Easily

Generative AI excels at creating natural sentences and explaining general knowledge. However, it does not inherently know about newly registered lecture materials, workbooks, or answer keys in a service. If a learner asks a question in this state, problems arise where the AI either gives up on answering or generates hallucinated (false) answers.

The method we chose to solve these two problems was RAG. Instead of relying solely on the AI's internal memory, this approach first accurately retrieves the relevant section of the textbook matching the student's question from a database, provides it via the prompt, and then generates the answer.


Introducing Dense Search

For RAG to retrieve the appropriate textbook material for a question, a computer must be able to compare the meanings of sentences. However, because computers do not understand the meanings of letters and words themselves, they use a method of converting text into numbers and calculating distances.

  • Vector: A series of numerical coordinates that represent the meaning of a sentence as a position in space.

  • Embedding: The task of converting human language into these vector coordinates, and the dedicated AI that handles this is called an embedding model.

  • Vector Search: A technique for mathematically finding the documents situated closest to the query vector in space.

One of the most widely used methods in vector search is Dense Search. It places sentences close to each other if the overall context and nuance of the sentences are similar, even if the exact words do not match.

If a student asks, "Why is the answer to question 3 option 2?", the document in the textbook titled "Step-by-step Solution and Explanation for Question 3" is placed very close to it in space because their meanings are similar, despite the slightly different phrasing. On the other hand, an unrelated document such as "Lecture Cancellation and Refund Policy Guide" is placed far away in space.

Therefore, even if the learner does not use the exact phrasing or technical terms written in the textbook, Dense Search can understand the nuance of the question and effectively retrieve relevant explanatory materials.

To find documents in the lecture materials matching the students' questions, our team first built a Dense Search pipeline using OpenAI's text-embedding-3-large model. While it demonstrated decent search performance for general conceptual questions, questions where exact identifiers were critical required additional refinement.

For example, when a student asks, "Tell me the answer to question 3," Dense Search alone may not be able to strictly distinguish between question 3 and question 13, which share similar formats and contexts. Most exam questions within the same textbook have nearly identical sentence structures and expressions, such as "Which of the following is correct?" or "Answers and Explanations."

In this situation, when a student asks, "Tell me the answer to question 3," the AI perceives contextual words like question, answer, and exam more strongly than the key term 3. As a result, simply because the passage structure or explanation context is similar, the AI determines that the document for question 13 is semantically closer than question 3, mistakenly retrieving question 13 as the top result.


Introducing Sparse Search

While Dense Search compares the meaning and context of sentences, Sparse Search does not look at context; instead, it strictly evaluates whether the exact characters in the question actually appear in the document. By this standard of comparison, 3 and 13 are completely different characters. In the document for question 13, the question's key token 3 is absent, so it receives zero lexical matching score.

However, there was an obstacle to this literal character-matching method as well: the notation varies from person to person and across different textbooks, even for the same question 3.

A textbook might write Problem 03 or Question 3, whereas a student might ask about Question #3. If matched purely literally, these expressions are treated as different words, causing the search to fail. In particular, with notations that leave only numbers, like Question 3, the digit 3 appears all over the textbook as page numbers or option numbers as well, diminishing its distinctive power on its own.

To resolve this, we normalized question number notations appearing in various formats—such as Problem 03, Question 3, and Question #3—into a single identifier token, Problem3. Consequently, question 3 and question 13 each gained completely distinct unique identifiers, Problem3 and Problem13, ensuring that documents with the correct numbers are prioritized in search.


Combining with Hybrid Search

Relying solely on Sparse Search introduces another problem: learners may ask questions using expressions different from those in the textbook.

Student's question: "Why does the demand curve slope downward?"
Textbook passage: "Principles of Increased Consumption Due to Price Decreases"

If two sentences share almost no common words, it is difficult to find the relevant document using Sparse Search alone. Conversely, Dense Search is strong against such vocabulary discrepancies.

Thus, edutap implemented Hybrid Search, which combines Sparse Search to verify exact notations and Dense Search to find semantic similarity. For questions containing question numbers or technical terminology, Sparse Search captures the exact notations, while for colloquial questions phrased differently by students, Dense Search complements it by finding semantically close materials.

When combining the results of the two search methods, weighting is required. Because Dense Search and Sparse Search have different score ranges and distributions, simply adding the raw scores together can cause the results from one side to be disproportionately reflected. edutap compared multiple ratios using validation data created from actual student queries and confirmed that reflecting 80% Sparse and 20% Dense yielded the highest search performance for our current educational materials.

In exam preparation materials, there were many questions containing exact identifiers such as question numbers and technical terms. In this environment, giving a slightly higher weight to keyword matching was advantageous. However, this ratio is not a one-size-fits-all answer for every service. Since the optimal ratio can change depending on the nature of the materials and actual query types, continuous validation with service data is necessary.


Conclusion

In an AI Tutor, simply adopting complex models is not the only important factor. When a student asks, "Explain question 3," the fundamental capability of locating question 3 from the current lecture and answering with supporting evidence must come first.

edutap seamlessly integrates not only Dense Search for semantic understanding, but also BM25-based Sparse Search, metadata filtering to narrow the scope to the currently viewed lecture, and a reranking pipeline that strictly curates the final candidate documents. Moving forward, we will continue to improve search accuracy based on real student questions and search results.


2026 Coxwave. All rights reserved.

powered by

2026 Coxwave. All rights reserved.

powered by

2026 Coxwave. All rights reserved.

powered by

2026 Coxwave. All rights reserved.

powered by