Overview
Silverchair, a technology provider for academic publishers, engaged the search and AI consultancy OpenSource Connections to build a way of measuring the quality of retrieval-augmented generation (RAG) systems. An LLM generates questions from stored documents, and each question is paired with its source context and a ground truth to form a question-context-truth triplet, with human reviewers checking that the questions and ground truths make sense. The RAG system under test then answers each question and an LLM grades the answers against the ground truth, using the RAGAS metrics of faithfulness, answer relevance, context precision, context recall and answer correctness.
The framework is built with Python, LlamaIndex, RAGAS and LangSmith, which is used as the dashboard for tracking metrics, and a configuration system lets it test several RAG strategies automatically. OpenSource Connections later described a Silverchair Lab playground where publishers can experiment with strategies, models and parameters and see the inference cost of each chat.
Benefits and outcomes
- OpenSource Connections reports that the pipeline was demonstrated end to end on a small sample dataset, with results shown in LangSmith.
- OpenSource Connections reports that several RAG strategies were tested and scored.
- Silverchair’s CTO, Stuart Leitch, said in the case study that the work supported hyperparameter optimisation and helped refine decisions about performance, cost and latency.
- OpenSource Connections reports that new models could be swapped into the evaluation pipeline within days of release.
Notes and quotes
- “When ramping up in a new technology pattern such as RAG, we generally seek to get a boost from experts in the field.” Stuart Leitch, CTO, Silverchair.
- “Quality measurement is the key to developing effective generative AI.” Charlie Hull, lead consultant, OpenSource Connections.
- Silverchair planned to store the results of each evaluation in a database, build more in-depth evaluation datasets, and use expert human review to check their quality.
Sources
This entry was written with the help of AI, from the sources listed. Please check the sources before relying on it, and let us know if anything needs correcting.
