Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Orchestrator and Classifiers Auditing #208

Open
giusedroid opened this issue Jan 21, 2025 · 0 comments
Open

Feature request: Orchestrator and Classifiers Auditing #208

giusedroid opened this issue Jan 21, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@giusedroid
Copy link

Use case

Related to #152 but slightly different. This issue is focused to auditing capabilities for Classifiers, in particular on the input, output, and execution context of Classifier::process_request().

In highly regulated environments, customers are required to inspect punctually all the interactions among agents, but most improtantly at the interface between human users and the orchestrator.
Classification and dispatching of intents are critical for the correct operation and evolution of an agentic system, especially if this is to be integrated with existing legacy systems (CRMs, CMSs, Payment...).

Our main challenge with MAO's current implementation is the lack of access to session_id and user_id at the classifier scope. Ideally we'd like to be able to log input, output and some contextual information related to the invocation of the LLM (prompt version id, classification confidence label, inference parameters, link to chat history and messages used in the inference context window, input and outputs of encoders/decoders). We'd like to index this information based on session_id and user_id.

In #152 an approach is proposed to audit agent behaviour, but this won't provide the same capabilites for classifiers.

Ideally these two trace streams (agents and user/encoders/decoders/classifiers) would then be combined to produce a full audit trace of every interaction with the system.

Solution/User Experience

## Proposed Solution

  1. provide user_id and session_id in the scope of downstream components of the Orchestrator, like a classifier
  2. wrappers/decorators or global static logging channel for auditing purposes

User Experience

custom_auditor = AuditStreamProvider(storage=DynamoDBAuditStorage)
orchestrator = MultiAgentOrchestrator(classifier=custom_bedrock_classifier, audit_stream=custom_auditor)

in the implementation of a classifier

@mao.auditable(user_id, session_id)
def process_request(self,input_text: str, chat_history: List[ConversationMessage]) -> ClassifierResult:
    # method implementation

so that whenever this method is executed relevant information is stored in the auditing channel of choice (in this example, a DynamoDB table, similar to what's done for Chat History)

alternatively

def process_request(self,input_text: str, chat_history: List[ConversationMessage], user_id, session_id) -> ClassifierResult:
   AuditStreamProvider.log(user_id, session_id, ClassifierResult, ClassifierInput) # this could also be a logger, but we'd still require access to user_id and session_id

Alternative solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants