From the course: Hands-On AI: Implementing Agentic Systems

Auditing and transparency

- [Instructor] From an accounting sense, an audit is an examination process that ensures financial data is accurate, complete, and complies with the relevant accounting standards. When we think of audit and transparency in agents in general, it's quite similar. We need to understand what input it had, what conclusions it came to, what actions it took, and all the steps in between. For many use cases, this is useful for debugging. If you get an odd or error result, you want to know why, so you can fix it. But for other use cases, especially anything in finance or healthcare, you're going to need quite a bit more. To be specific, you need to provide reasoning that fills in the details of, because X, Y, and Z, we took actions A, B, and C. And even more challenging. Remember, we're using an LLM, which doesn't always give the same answers and is wrong some percentage of the time. In the US at least there are additional considerations. But for information on that, I recommend you talking to a specialist in compliance. That's not me, but I can make sure you can answer their questions. In general, your audit logs will need to be able to capture a number of things. First, you need to think about the input received. This includes the user prompts and the data sources. Next, you need the system prompt, which shaped the overall behavior of the system. Then you'll need to understand the model along with what version it was. Then you need to capture the context added at runtime via RAG, or whatever other approach you might have used. Then on the output side, you need to capture the output or response of the system and what actions it triggered. And finally, you need to capture the result of the triggered actions. If you start there, you'll have the basics, but you'll almost definitely have to iterate over time as you need to debug new things, have visibility into different components, or even as you identify new threats to your system.

Contents