Object.Subtypes.HumanClient (object v0.1.2)

Human client interface with natural language processing and preference learning. Handles human-AI interaction patterns and learns user preferences.

Summary

Functions

Creates a new Human Client interface for human-AI interaction.

Processes natural language input using NLP pipeline.

Provides feedback on a service and updates preference model.

Updates the client's trust level based on interaction outcomes.

Functions

new(opts \\ [])

Creates a new Human Client interface for human-AI interaction.

Parameters

  • opts - Configuration options:
    • :id - Client identifier
    • :user_profile - User profile information
    • :communication_style - Preferred communication style
    • :expertise_domain - Domain of expertise
    • :goal - Custom goal function for satisfaction

Returns

HumanClient struct initialized with preference learning capabilities

process_natural_language(client, input_text)

Processes natural language input using NLP pipeline.

Analyzes input text for intent, extracts preferences, and performs emotional analysis. Updates the client's interaction history and preference model based on the processed input.

Parameters

  • client - HumanClient struct
  • input_text - Natural language input to process

Returns

Tuple with parsed intent and updated client with learned preferences

provide_feedback(client, service_id, rating, comments \\ "")

Provides feedback on a service and updates preference model.

Records feedback with rating and comments, then updates the preference model to learn from the user's feedback patterns.

Parameters

  • client - HumanClient struct
  • service_id - Identifier of the service being rated
  • rating - Numerical rating (typically 1-5)
  • comments - Optional textual feedback (default: "")

Returns

Updated HumanClient with feedback recorded and preferences updated

update_trust(client, interaction_outcome)

Updates the client's trust level based on interaction outcomes.

Adjusts trust level positively for positive outcomes and negatively for negative outcomes, maintaining bounds between 0.0 and 1.0.

Parameters

  • client - HumanClient struct
  • interaction_outcome - Outcome (:positive, :neutral, :negative)

Returns

Updated HumanClient with adjusted trust level