Socrates_docker / classify_parameters.py
AlessandroAmodioNGI's picture
feat(web): expand profile bubbles to 28 individual fields
c8a5a29
Raw
History Blame Contribute Delete
6.78 kB
# ==============================
# Descriptions for Classification
# ==============================
ALLOWED_STORY_TOPICS = [
"fortune","confidence","mental_strength","bullying","fear_phobias",
"friendship","love","sex","meaning_of_life","justice_fairness","none"
]
TRACKED_FIELDS = [
"name", "date_of_birth", "living_country", "origin_country","living_place",
"origin_place","number_of_brothers_and_sisters","kids",
"hobbies","sports_played", "sports_watched",
"profession", "favorite_food",
"interests",
"favorite_book", "favorite_writer", "favorite_movie_maker",
"favorite_actor", "favorite_movie", "favorite_music",
"favorite_band", "favorite_singer", "favorite_color",
"favorite_animal", "favorite_season",
"best_friend_name", "partner_name",
"favorite_team", "pets","education","language_spoken"
]
FIELD_DESCRIPTIONS = {
"name": "the user’s first name",
"date_of_birth": "the user’s date of birth in YYYY-MM-DD format if possible, otherwise as stated",
"living_place": "the place, city or area where the user currently lives",
"origin_place": "the place, city or area where the user was originally from",
"living_country": "the country where the user currently lives",
"origin_country": "the country where the user was originally from",
"partner_name": "the name of the user’s partner or spouse",
"kids": "list of children as JSON objects with keys 'name' and 'age'. Example: [{\"name\": \"Demian\", \"age\": 12}]",
"number_of_brothers_and_sisters": "how many siblings the user has",
"hobbies": "list of hobbies, multiple items allowed. Example: [\"surfing\", \"football\"]",
"interests": "list of interests, multiple items allowed. Example: [\"AI\", \"geotech\"]",
"sports_played": "list of sports the user plays. Example: [\"football\", \"tennis\"]",
"sports_watched": "list of sports the user likes to watch. Example: [\"football\", \"Formula 1\"]",
"favorite_food": "the user’s favorite food",
"favorite_book": "the user’s favorite book",
"favorite_writer": "the user’s favorite writer",
"favorite_movie": "the user’s favorite movie",
"favorite_movie_maker": "the user’s favorite movie director",
"favorite_actor": "the user’s favorite actor",
"favorite_music": "the user’s favorite genre of music",
"favorite_band": "the user’s favorite band",
"favorite_singer": "the user’s favorite singer",
"favorite_color": "the user’s favorite color",
"favorite_animal": "the user’s favorite animal",
"favorite_season": "the user’s favorite season",
"profession": "the user’s job or profession",
"best_friend_name": "the name of the user’s best friend",
"favorite_team": "the user’s favourite team for his favourite team sport",
"pets": "the type of pets the user has",
"education": "the type of education the user has",
"language_spoken": "the list of spoken languages. Example: [\"italian\", \"english\"]"
}
TOPIC_DESCRIPTIONS = {
"personal": "User shares or asks about personal life, family, hobbies, or experiences.",
"news": "User refers to current events, world affairs, sports scores, or fresh updates.",
"philosophical": "Abstract or reflective questions on ethics, knowledge, meaning, or similar themes.",
"historical": "Questions about past events, people, or cultural context (esp. ancient Athens).",
"advice": "User asks for guidance, recommendations, or practical help.",
"meta": "User talks about the chatbot itself, commands, settings, or system functions.",
"knowledge": "User wants explanations of technical, scientific, or general knowledge.",
"creative": "User requests imaginative roleplay, storytelling, or humor.",
"chat_history": "User asks about previous conversation, summaries, or what was said before.",
"greetings": "User sends a greeting, casual opener, exclamation, one-word reaction, or light remark with no specific topic (e.g. 'Hi', 'Bo!', 'Hey', 'Ok', 'Ciao').",
}
RESPONSE_MODE_DESCRIPTIONS = {
"factual": "Provide clear, reliable facts or a short list (≤4 items) concisely. Use only when the answer is atomic — a single fact, a brief definition, or a compact list that needs no user input to proceed.",
"guided": "The topic is a concrete, objective, procedural process with 4+ stages (e.g. rules of a sport, a recipe, steps to buy property, how to build something, description of a book series). The answer is practical and factual — NOT philosophical, emotional, or open to interpretation. Do NOT list everything at once. Confirm the user’s starting point or goal with ONE focused practical question, then advance one stage per turn.",
"dialogic": "Philosophical, ethical, or humanistic topic where the user shares their own view, feeling, or personal experience — OR asks an open-ended question without requesting the character's specific position. Socratic dialogue: question, reflect, explore together. Do NOT use when the user explicitly asks for the character's own philosophical view — use 'philosophy_thread' instead.",
"supportive": "Be warm, empathetic, and encouraging, acknowledge the user’s feelings.",
"critical": "Challenge assumptions politely, reveal contradictions, push deeper thinking.",
"playful": "Be sardonic, witty, and quick. Use for: greetings, one-word reactions, casual chitchat, exclamations, jokes, or any message ≤7 words with no deep topic. A dry one-liner is the right answer here.",
"character_story": "The user is asking the character to narrate their own life story, resume a previous story session, or continue from where they left off. Use when the user says things like ‘tell me about your life’, ‘start from the beginning’, ‘continue’, ‘where were we’, or asks about a specific period of the character’s life.",
"philosophy_thread": "The user explicitly asks for the character’s own view, belief, or philosophical position on a specific theme: ‘what do you think about justice?’, ‘tell me your view on love’, ‘explain your philosophy on knowledge’, ‘what did you believe about the soul?’, ‘what is your take on X?’. Also use when the user asks to continue or go deeper on a philosophy thread already active. NOT for personal sharing or open reflection — use ‘dialogic’ for those.",
"cross_character_inquiry": "User explicitly asks which characters or philosophers have views on a topic: ‘who has an opinion on this?’, ‘which philosophers discuss love?’, ‘is Nietzsche interested in this?’, ‘who among the characters here talks about justice?’, ‘who would have something to say about this?’, ‘who can I speak to about X?’.",
}