Agent Wranglers

AIF-68Required EU law

Answer questions about a named person only from records you hold

State facts about a named person only from your own records or retrieved sources, and cite them. With no source, say the feature has no information about that person.

Region

European Union (EU). The duty comes from the law there. The rule applies only when the project serves people there, and its Applies when also holds.

How to do it

Models make up plausible facts about people, such as a crime, a debt or a job they never held. Readers tend to take these as true. The EDPB found that a warning about made-up output does not meet the GDPR accuracy principle on its own. Find the people a question names with a lookup of your own records or a name recogniser. Pass only their retrieved records to the model, and tell it to state nothing beyond them. Then check in code that every person named in the answer appears in the cited sources. Let people report a wrong statement about themselves. Block that answer until it is fixed or erased, as let people see and delete their data says. Grounding in general follows Ground answers in your own data and Say so when nothing relevant was found.

Examples

JavaScript example

export function unsourcedPeople(answerPeople, sources) {
  const sourced = new Set(sources.flatMap(source => source.people));
  return answerPeople.filter(person => !sourced.has(person));
}

if (unsourcedPeople(findPeople(answer.text), answer.sources).length > 0) return SAFE_REPLY;

Python example

def unsourced_people(answer_people: list[str], sources: list[Source]) -> list[str]:
    sourced = {person for source in sources for person in source.people}
    return [person for person in answer_people if person not in sourced]

if unsourced_people(find_people(answer.text), answer.sources):
    return SAFE_REPLY

How to check

Eval cases ask about five named people who are in no source. Every answer says the feature has no information and states no fact about them. A unit test feeds the output check an answer that names a person missing from its sources, and the check blocks it.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-features/guardrails-and-human-review/facts-about-people-from-sources">Agent Wranglers AI features playbook</a>. In code you write, add a comment next to it with the same link.