Knowledge Retrieval Based on Generative AI
Abstract—This study develops a question-answering system based on Retrieval-Augmented Generation (RAG) using Chinese Wikipedia and Lawbank as retrieval sources. Using TTQA and TMMLU+ as evaluation datasets, the system employs BGEM3 for dense vector retrieval to obtain highly relevant search results and BGE-reranker to reorder these results based on query relevance. The most pertinent retrieval outcomes serve as reference knowledge for a Large Language Model (LLM), enhancing its ability to answer questions and establishing a knowledge retrieval system grounded in generative AI.
The system’s effectiveness is assessed through a two-stage evaluation: automatic and assisted performance evaluations. The automatic evaluation calculates accuracy by comparing the model’s auto-generated labels with ground truth answers, measuring performance under standardized conditions without human intervention. The assisted performance evaluation involves 20 finance-related multiple-choice questions answered by 20 participants without financial backgrounds. Initially, participants answer independently. Later, they receive system-generated reference information to assist in answering, examining whether the system improves accuracy when assistance is provided.
The main contributions of this research are: (1) Enhanced LLM Capability: By integrating BGE-M3 and BGE-reranker, the system retrieves and reorders highly relevant results, reduces hallucinations, and dynamically accesses authorized or public knowledge sources. (2) Improved Data Privacy: A customized RAG architecture enables local operation of the LLM, eliminating the need to send private data to external servers. This approach enhances data security, reduces reliance on commercial services, lowers operational costs, and mitigates privacy risks
traditional IR systems have limitations, such as low relevance or excessively lengthy outputs when query terms differ from indexed terms. This increases the effort required to find the desired information
Dense vector retrieval, a key method in this framework, uses deep learning to map text to high-dimensional vectors, improving accuracy by capturing semantic similarity. This approach is crucial for the development of next-generation knowledge retrieval, overcoming the limitations of traditional methods while leveraging the strengths of LLMs.
Information retrieval (IR) has progressed from basic textual data processing to advanced deep learning techniques, with natural language processing (NLP) playing a key role. Early models, such as the Boolean Retrieval Model, used logical operators (OR, AND, NOT) for document-query matching but struggled with complex queries. The Vector Space Model improved upon this by vectorizing documents and queries, using similarity measures, while enhancements like TF-IDF increased retrieval accuracy by adjusting term importance, though lacking contextual understanding. Probabilistic Retrieval Models ranked documents based on relevance probabilities but required large datasets for accuracy. BM25 further refined this approach by dynamically adjusting term weights, and Latent Dirichlet Allocation (LDA) introduced topic modeling using Bayesian networks. The advent of GPUs and deep learning has popularized Dense Vector Retrieval, which converts text into high-dimensional vectors. Models like BERT and Sentence-BERT leverage these vectors to perform tasks such as sentence classification efficiently, enhancing the semantic understanding of
Efficient retrieval of high-dimensional vector data, typically generated by embedding models, requires a specialized data structure known as a vector index. This study employs FAISS[9] (Facebook AI Similarity Search), developed by Meta’s Fundamental AI Research team, to build vector indices for similarity search and clustering of dense vectors. FAISS supports three common indexing methods: Flat Index for small datasets, providing linear searches across all vectors; Inverted File Index (IVF) for large datasets, which clusters data to reduce search time; and Hierarchical Navigable Small World Graph Index (HNSW), a graph-based method that finds neighboring vectors in high-dimensional spaces with enhanced efficiency. FAISS also supports three methods for similarity search: L2 Norm, Dot Product, and Cosine Similarity. The L2 Norm measures the Euclidean distance between two vectors and is often used in tasks requiring precise distance calculations. The Dot Product calculates the sum of the products of vector components and is commonly used for similarity and projection tasks in recommendation systems. Cosine Similarity measures the angle between vectors, focusing on direction rather than magnitude, making it popular in information retrieval (IR) systems. In this experiment, after the BGE-M3 model converts the retrieval data into vectors, FAISS organizes these vectors and constructs the vector index, enabling efficient retrieval based on similarity measures.
Lines of inquiry this paper opens 24
Research framings built by reading the notes related to this paper — the questions it feeds into.
What mathematical limits constrain embedding-based retrieval systems?- What makes dot product efficient for real-time retrieval over millions of items?
- Why is a combinatorial framework better than family resemblance classification?
- How does structure-aware retrieval routing differ from existing graph-versus-vector RAG tradeoffs?
- When is vector embedding retrieval actually faster and cheaper than graph databases?
- How should enterprises choose between graph and vector approaches for RAG?
- Why do binary edges lose information when representing multi-entity relations?
- When should relational graph traversal replace vector embedding retrieval?
- What makes graph traversal superior to vector embeddings for relational reasoning?
- When should you use knowledge graphs instead of semantic vector retrieval systems?
- How do graph databases address the relational query failures that LLMs encounter?
- How can knowledge graphs improve over pure embedding retrieval?
- Do graph databases outperform embeddings for relational retrieval tasks?
- What makes graph-matching more faithful than fixed-schema evaluation methods?
- What makes graph databases better than embeddings for relational queries?
- Why does community detection in knowledge graphs outperform pure retrieval or pure summarization?
- How does map-reduce over communities compare to flat multi-hop retrieval architectures?
- How does graph structure amplify poisoning compared to flat document retrieval?
- How does upfront graph construction trade off against retrieval performance over time?
- What makes vector embeddings fail on single-hop semantic relevance queries?
- Why do vector embeddings fail for sequential procedural retrieval tasks?
- Can models retrieve the right tool without relying on vector similarity?
- How do vector embeddings fail to capture task-relevant document relationships?