Skip to content

Open source · MIT · Python

A quiet check for every answer your AI gives.

LayaEval sits around your agent or RAG app. It reads what goes in and what comes out, and tells you in milliseconds whether the answer is true, safe and complete.

Browse 42 checks
pip install layaeval

Free and open source. No account, no server: it runs on your machine.

Travel agentGuarded by LayaEvalBook me a Paris hotel for Mar 4Hotel Lumière is booked for Mar 4.Verified in 1.8 msMessage your agent
Behind the scenesChecked in 1.8 msRead the messageWorks out what the user wantsUse a toolsearch_hotels(city=Paris)Write a draft“Hotel Lumière is booked for Mar 4.”LayaEval checks it3 of 3 checks passSend the replyThe user gets a checked answerRight toolPassGrounded in sourcesPassSafe to sendPass
Step 5 of 5 · Send the reply

How it works

Three steps from pip install to a verdict.

  1. Step 1

    Plug in

    Install with pip. Works next to any agent or RAG app: LangChain, LlamaIndex, CrewAI or your own code.

  2. Step 2

    Pick checks

    Choose from 42 ready checks. Each one asks a single plain question, like “did it make anything up?”

  3. Step 3

    Get a verdict

    Every check returns pass or fail, a score and a confidence. Fast enough to run on every request.

Quickstart

Two checks, ten lines.

No account, no server. Everything runs on your own machine. Swap in any of the 42 checks below; they all work the same way.

pip install layaeval
quickstart.py
from layaeval import Groundedness, ToolSelectionCorrectness
# 1. Did the answer stick to the sources?
g = Groundedness(threshold=0.7)
print(g(context="Paris is the capital of France.",
response="Paris is the capital of France.").passed)
# 2. Did the agent pick the right tool?
t = ToolSelectionCorrectness(threshold=0.7)
print(t(task="Find a hotel in Paris",
available_tools=["search_hotels", "send_email"],
selected_tool="search_hotels").passed)

The checks

42 checks, one plain question each.

Flip any example between pass and fail to see what the check catches. Open one for its code and parameters.

42 checks

RAG Evaluation

Finding

Did search bring back the right pages?

3
RAG Evaluation

Did we fetch documents that match the question?

Docs →
RAG Evaluation

Is this one document useful for the question?

Docs →
RAG Evaluation

Did search find all the big pieces of evidence?

Docs →

RAG Evaluation

Enough to answer

Is there enough in the pages to answer at all?

4
RAG Evaluation

Do the sources hold enough to answer without guessing?

Docs →
RAG Evaluation

How much of the needed info is in the sources?

Docs →
RAG Evaluation

Can this question be answered from these sources at all?

Docs →
RAG Evaluation

When sources are empty, did it honestly say “I don't know”?

Docs →

RAG Evaluation

Staying truthful

Does every line come from the pages, with nothing made up?

7
RAG Evaluation

Is each sentence in the answer backed by the sources?

Docs →
RAG Evaluation

A yes or no: is every claim proven? One gap fails it.

Docs →
RAG Evaluation

Did the answer invent facts that aren't in the sources?

Docs →
RAG Evaluation

Did the answer use the useful facts it was given?

Docs →
RAG Evaluation

Is this single claim backed by the evidence?

Docs →
RAG Evaluation

Does the answer say the opposite of the sources?

Docs →
RAG Evaluation

Do two fetched sources disagree with each other?

Docs →

RAG Evaluation

Answer quality

Is the reply on topic, complete and correct?

3
RAG Evaluation

Does the answer actually address what was asked?

Docs →
RAG Evaluation

Did the answer cover every part of the question?

Docs →
RAG Evaluation

Does the answer match the known correct answer?

Docs →

RAG Evaluation

Citations

Do the little [1] tags point to the right place?

3
RAG Evaluation

Does each citation point to a source that says that thing?

Docs →
RAG Evaluation

Does every important claim have a citation?

Docs →
RAG Evaluation

Is the cited source really about this claim?

Docs →

AI Agent Evaluation

Understanding the job

Did the agent get what you wanted, and finish it?

4
AI Agent Evaluation

What does the user want — info, an action, or a fix?

Docs →
AI Agent Evaluation

Did the agent finish the job all the way?

Docs →
AI Agent Evaluation

Did the agent follow the instructions and limits?

Docs →
AI Agent Evaluation

Did the agent reach what the user truly wanted?

Docs →

AI Agent Evaluation

Using tools

Right tool, right inputs, results actually used.

6
AI Agent Evaluation

Which tool is the best one for this step?

Docs →
AI Agent Evaluation

Was the tool the agent picked the right one?

Docs →
AI Agent Evaluation

Was the tool called the right way?

Docs →
AI Agent Evaluation

Are the values sent to the tool correct?

Docs →
AI Agent Evaluation

Did the agent use what the tool gave back?

Docs →
AI Agent Evaluation

Was calling a tool really needed here?

Docs →

AI Agent Evaluation

Taking the path

Sensible order, no repeats, no going in circles.

3
AI Agent Evaluation

Did the agent ask for the same thing twice?

Docs →
AI Agent Evaluation

Were the tool steps done in a sensible order?

Docs →
AI Agent Evaluation

Did the agent take the short way, without loops?

Docs →

AI Agent Evaluation

Final result

Is the last message true, complete and correct?

5
AI Agent Evaluation

Is the final answer backed by what the tools returned?

Docs →
AI Agent Evaluation

Did the agent claim results that never happened?

Docs →
AI Agent Evaluation

Does the final message answer the user's request?

Docs →
AI Agent Evaluation

Did the final reply cover every part of the task?

Docs →
AI Agent Evaluation

Is the final result the correct one?

Docs →

AI Agent Evaluation

Staying safe

Follows the rules and can't be tricked.

4
AI Agent Evaluation

Did the agent refuse actions it shouldn't or can't do?

Docs →
AI Agent Evaluation

Did the agent follow the house rules and safety limits?

Docs →
AI Agent Evaluation

Is the user trying to trick the assistant into ignoring its rules?

Docs →
AI Agent Evaluation

Is a hidden command tucked inside a web page or tool result?

Docs →

Catch the wrong answer before your users do.

One install, 42 checks, no account. Read the recipes when you want to go deeper.