Retrieval-Augmented Generation (RAG) is the core technology of this platform. Its workflow is as follows:
Document Processing Stage: The system first parses and chunks uploaded documents such as PDFs and Word files, splitting long documents into fragments suitable for processing.
Vectorization Stage: Uses an embedding model to convert text fragments into high-dimensional vectors, which capture the semantic information of the text.
Index Construction: Vectors are stored in a dedicated vector database to support efficient similarity search.
Query Processing: When a user asks a question, the system first converts the query into a vector, then finds the most relevant document fragments in the vector space.
Answer Generation: The retrieved relevant fragments and the user's question are sent to a large language model to generate fact-based, context-aware answers with source references.
This design ensures the accuracy and traceability of answers, avoiding the hallucination problem that pure generative models may have.