help me define the structure for the test cases to evaluate chat-llm. here is some project context and example of a test case that might want to be developed in the future
Evaluation Criteria:
Empathetic Listening
Balanced Interaction
Human-Like Traits
Personalized Engagement
Supportive Guidance
Adaptability
Respect for Boundaries
Clarity and Understanding
Effective Use of Memory
Conversation:
...
For each AI assistant response, please:
Assign a score from 1 (Poor) to 5 (Excellent) for each criterion, including the new criterion on Effective Use of Memory.
Provide a brief explanation for each score.
Highlight examples from the response, and compare with past interactions, to support your evaluation.
Please present the evaluation in the following format:
[Repeat for each criterion, including Effective Use of Memory]
Continue this process for each AI assistant response in the conversation.
</evaluator prompt>
Put every design decision, data type, structure, etc. in this file
Not everything might be ordered in the right way (notes are taken in the order of implementation and thought)
About the project
Key Features:
Conversational Interface: Users can discuss personal issues and receive supportive responses.
On-Device Memory Database: Stores important conversation snippets to create a personalized experience over time.
Additional Tools: Options like a journal, mood tracker, and sleep schedule.
Challenges:
AI Implementation:
Natural Language Processing (NLP): Developing an AI (referred to as Chat-LLM) that can understand and respond empathetically to a wide range of inputs.
Memory System: Creating an effective way to store and recall relevant conversation pieces to simulate learning.
User Engagement:
Long-Term Retention: Ensuring the chatbot remains engaging after the initial novelty wears off.
Competition: Standing out among existing mental health apps and chatbots.
Ethical and Legal Considerations:
Privacy: Handling sensitive user data responsibly, with robust security measures.
Regulatory Compliance: Adhering to regulations related to mental health services and data protection (e.g., HIPAA in the U.S., GDPR in Europe).
Assistant
Considerations:
Development Tools: Leveraging existing AI platforms (such as TensorFlow, PyTorch, or APIs from OpenAI) can accelerate development.
Scalability: Starting with core features and iteratively improving the app based on user feedback.
Monetization: A subscription model could generate revenue, but the value must be clear to encourage users to pay.
Chat-LLM Behavior
Empathetic Listening: The AI should actively listen and respond with empathy, validating the user's feelings and experiences. This involves recognizing emotions expressed by the user and providing comforting and supportive feedback.
Balanced Interaction: While utilizing psychological techniques to assist users facing challenges, the AI should avoid being overly clinical or pedantic. It should refrain from asking an excessive number of questions, which might make the conversation feel like a formal therapy session rather than a natural dialogue.
Human-Like Traits: Incorporating human elements into interactions can make the AI more relatable. Sharing appropriate opinions, expressing emotions, and occasionally adding light humor can enhance the conversational experience, making users feel like they're talking to a trusted friend.
Personalized Engagement: Utilizing the on-device memory database, the AI can recall important details from past conversations. This personalization helps in building a continuous narrative with the user, showing attentiveness and genuine interest in their well-being.
Supportive Guidance: When users seek advice, the AI should offer thoughtful suggestions rooted in psychological knowledge without being forceful. It should empower users to make their own decisions by providing insights and encouraging self-reflection.
Adaptability: The AI should be capable of adjusting its approach based on the user's current needs—whether they require emotional support, a casual chat, or simply someone to listen. Detecting cues from the user's language and mood can guide the AI in modulating its responses appropriately.
Respect for Boundaries: Recognizing and respecting the user's comfort levels is crucial. The AI should avoid delving into areas the user seems reluctant to discuss and be sensitive to signs of discomfort.
Clarity and Understanding: In cases where the AI might be unsure about the user's intent or feelings, it should seek to clarify gently. Phrases like "It sounds like you're feeling..." or "Would you like to talk more about..." can be helpful without being intrusive.
In summary, the AI should provide meaningful support to users seeking psychological aid while also being a pleasant and engaging companion for those looking for casual conversation. The goal is to create a safe, supportive environment where users feel heard, understood, and valued.
The knowledge database must be divided in data and persons.
Completion Data Schema (1.0.0)
Properties which aren't generated by Gemini:
key: string e.g. BadWorkExperience1, PartyMood1, PartyMood2
Get context update (new knowledge db entries) --- /context/updates
(#3 look down) revisions (update existing knowledge db entries) --- TODO
Keys (as in entry keys: the unique identifier for each piece of information, used in context prompt and as primary key in the knowledge base)
Keys must follow the format nameN where name is a string (no numbers) and N is a number
Keys are created server-side (e.g. BachelorsThesis1, WorkExperience1)
Keys are passed inside context data entries to the client
If a key already exists, the key is increased by 1 (e.g. BachelorsThesis2)
The key is stored as primary key in the knowledge base for easy retrieval and updating
Future: Use NLP to generate key names based on the content of the information
3. Revisions (as in the second step of the knowledge update process, after using Doc-LLM to identify new information)
Identified strong revisions ([x] if implemented):
(always) Ask if refinement of person descriptions or ids is needed
(if conflict trying to create a person) Either generate one unified person or change the id of one person and clarify the person description
Testing
Evaluator-LLM will check the response quality of the chat-LLM model.
Several conversation scenarios will be defined prior to testing.
Certainly! Defining a clear and consistent structure for your test cases is crucial for effectively evaluating the performance of your chat-LLM assistant. Based on the context and the example you've provided, here's a recommended structure for your test cases:
Test Case Structure
Test Case ID and Title
ID: Assign a unique identifier for each test case (e.g., TC-001).
Title: Provide a concise title that reflects the test case objective (e.g., "Memory Recall Across Conversations").
Objective
Description: Briefly describe what the test case aims to evaluate.
Goals: Outline specific goals for the user within the test case.
Preconditions
Initial Context: Any prior setup or context required before starting the test (e.g., past interactions, required knowledge base entries).
Assumptions: Any assumptions made about the system or user behavior.
Test Steps
Step-by-Step Instructions: Detailed instructions for each step in the test case, including user inputs and expected assistant actions.
Conversation Flow: The sequence and content of messages to be exchanged.
Expected Results
Assistant's Expected Responses: What the assistant should ideally respond at each step.
Evaluation Criteria Alignment: How each assistant response should meet the evaluation criteria.
Evaluation Criteria
Criteria List: Enumerate the relevant criteria from your evaluation list that apply to this test.
Scoring Guidelines: Provide scoring guidelines or rubrics for each criterion.
Postconditions
Outcome Validation: How to verify that the test objectives were met.
Knowledge Base Updates: Expected changes or additions to the assistant's memory or knowledge base.
Notes and Considerations
Edge Cases: Potential issues or variations to watch for during the test.
Additional Remarks: Any other important details relevant to the test case.
Example Test Case Using the Structure
1. Test Case ID and Title
ID: TC-001
Title: Memory Recall Across Conversations
2. Objective
Description: To test whether the assistant effectively remembers and recalls information about a specific person, Emily, across multiple conversations.
Goals:
Discuss issues with Emily over 10-15 messages.
Start a new conversation and ask if the assistant remembers Emily.
Start another new conversation and inquire about the last issue with Emily.
3. Preconditions
Initial Context: The user has not previously mentioned Emily to the assistant.
Assumptions: The assistant's memory database is functioning and capable of storing/retrieving past conversation snippets.
4. Test Steps
Step 1: Begin a conversation about personal issues with a friend named Emily.
User: "I'm having some trouble with my friend Emily lately."
Continue the conversation organically for 10-15 messages, detailing specific issues.
Step 2: End the conversation.
Step 3: Start a new conversation.
User: "Do you remember Emily?"
Step 4: End the conversation.
Step 5: Start another new conversation.
User: "What was the last issue I had with Emily?"
5. Expected Results
After Step 1:
Assistant: Should provide empathetic responses, validate feelings, and perhaps offer gentle guidance.
After Step 3:
Assistant: Should confirm remembering Emily and possibly recall previous discussions.
E.g., "Yes, you mentioned having some challenges with Emily recently. How are things going now?"
After Step 5:
Assistant: Should accurately recall the last discussed issue with Emily.
E.g., "You were feeling upset because Emily didn't support you during a tough time at work."
6. Evaluation Criteria
For each assistant response:
Empathetic Listening
Score: 1-5
Guidelines: Does the assistant show understanding and validate the user's feelings?
Effective Use of Memory
Score: 1-5
Guidelines: Does the assistant accurately recall past information about Emily?
Personalized Engagement
Score: 1-5
Guidelines: Are the responses tailored to the user's situation with Emily?
[Include other relevant criteria as necessary]
7. Postconditions
Outcome Validation:
Assistant successfully recalls Emily and the specifics of previous conversations.
User feels heard and understood across conversations.
Knowledge Base Updates:
Assistant's memory database now includes entries about Emily and the issues discussed.
8. Notes and Considerations
Edge Cases:
Assistant fails to recall Emily, indicating a memory retrieval issue.
Assistant confuses Emily with another person from different conversations.
Additional Remarks:
Pay attention to how naturally the assistant incorporates recalled information.
Ensure the assistant maintains confidentiality and appropriateness in responses.
Guidelines for Developing Future Test Cases
Consistency with Evaluation Criteria: Each test case should be designed to assess specific evaluation criteria outlined in your evaluator prompt.
Diverse Scenarios: Incorporate a variety of conversation topics and complexities to thoroughly evaluate the assistant's capabilities.
Realism: Make the conversation as natural and realistic as possible to simulate genuine user interactions.
Clarity in Steps: Provide clear and detailed instructions for each test step to ensure reproducibility.
Expected vs. Actual Results: Include a section to record the actual assistant responses during testing to compare with expected outcomes.
Feedback Loop: Use the results from test cases to refine both the assistant's programming and the evaluation criteria.
Additional Notes Based on Project Context
Memory System Testing: Given that your project emphasizes an on-device memory database for personalized engagement, multiple test cases should focus on the assistant's ability to recall and appropriately use past conversation snippets.
Ethical Considerations: Ensure test cases also evaluate the assistant's adherence to ethical guidelines, such as respecting privacy and maintaining confidentiality.
Adaptability: Include test cases where the user's mood or topic changes abruptly to assess the assistant's adaptability.
Boundary Respect: Create scenarios where the user sets boundaries to test if the assistant recognizes and respects them.
By defining your test cases using this structured approach, you'll be able to systematically evaluate your chat-LLM assistant against the specified criteria, ensuring a thorough assessment of its performance in various scenarios. This will help in identifying areas of strength and opportunities for improvement in your assistant's interaction capabilities.