Definition: Context Adherence is a measurement of closed-domain hallucinations: cases where your model said things that were not provided in the context. If a response is adherent to the context (i.e. it has a value of 1 or close to 1), it only contains information given in the context. If a response is not adherent (i.e. it has a value of 0 or close to 0), it’s likely to contain facts not included in the context provided to the model.

Context adherence with Luna-2

You can also leverage Galileo’s proprietary Evaluation SLMs to calculate context adherence. Context Adherence Luna is computed using Galileo in-house small language models (Luna). Context Adherence Luna is a cost-effective way to scale up your RAG evaluation workflows. To leverage Luna for context adherence or other metrics, reach out to our team.