chapter fourteen
14 Asking a KG questions with natural language
This chapter covers
- Understanding the limitations of RAG in complex scenarios
- Building an advanced question-answering system that mimics domain expertise on KGs
- Transforming query results into meaningful, actionable summaries
In this chapter, we will explore how to build an advanced system that can answer questions effectively. Using a law enforcement example as our guide, we’ll compare the retrieval-augmented generation (RAG) approach and our new “expert emulation” method for capturing the expertise of skilled information retrieval.
The framework we’ll develop rests on several pillars:
- Understanding and properly routing different types of user questions
- Extracting and representing domain knowledge in a form that LLMs can use effectively
- Implementing expert-like reasoning patterns for query construction
- Ensuring that results are presented in meaningful, actionable ways
This framework is designed to integrate with a front-end layer, ensuring that the question-answering system can be presented to end users through a graphical interface. This integration-first approach influences many of our design decisions throughout the chapter, from how we structure query responses to how we handle data visualization.