Development of Athena-2.4 AI ChatBot

Piyush

Piyush Golan

Athena-2.4

NOTICE: This project is no longer maintained and has been officially deprecated.
Let's walk through an example for how athena's analyzer would process the following message:
"i had panic attacks yesterday"
1. Lowercase Conversion The analyzer first converts the input to lowercase (though in this case it’s already lowercase):
final lowercaseMessage = "i had panic attacks yesterday";
2. Topic Analysis The analyzer loops over each topic category in the _topicWeights map. For each category, it checks if the message contains any of its keywords. In our updated code, the mental_health category has keywords like:
"panic attack" (weight: 1.5) "panic attacks" (weight: 1.5) "panic" (weight: 1.4) (other keywords such as "anxiety", "anxious", etc.) Processing the Message:
The message contains the substring "panic attacks", which matches the keyword "panic attacks". → Score added: 1.5
The message also contains "panic". Even though it’s part of the phrase "panic attacks", the simple substring matching will detect "panic" as well. → Score added: 1.4
Summing these scores gives a total score of 2.9 for the mental_health category.
No other topic categories (technology, business, health, etc.) gain any points because their keywords are not present in the message.
Resulting Topic Analysis:
Main Topic: "mental_health" Confidence: Calculated as score / 5.0, so about 2.9 / 5.0 ≈ 0.58 Related Topics: An empty list (since only one category matched)
3. Emotion Detection The analyzer then checks the message against its defined emotion patterns in the _contextualPatterns['emotion'] map. For the "anxiety" emotion, the patterns include:
"anxious", "anxiety", "panic", "panic attack", "nervous", "stressed", "overwhelmed" Processing the Message:
The message contains the substring "panic". It also effectively contains "panic attack" (since "panic attacks" includes that substring). These matches lead the analyzer to detect an anxious sentiment.
Resulting Emotion: "anxiety"
4. Intent Detection The analyzer looks for cues to determine the message's intent. The intent patterns are organized into categories like:
Question: (e.g., words like "how", "what", or a question mark ?) Request: (e.g., phrases like "can you", "please") Statement: (e.g., phrases like "i think", "i believe") Correction or Clarification: (e.g., "actually", "could you explain") Since the message:
"i had panic attacks yesterday"
is a straightforward factual statement without any question markers or request phrases, it is classified as a statement.
Resulting Intent: "statement"
5. Context Analysis The analyzer also evaluates contextual clues:
Requires Context: It checks for ambiguous pronouns (like "it", "that", "this") that might require additional context. → In this message, there are no such words, so this returns false.
References History: It checks if words from previous messages (if any exist) are referenced. → Assuming no relevant history, this returns false.
Continues Thread: It looks for markers (e.g., "and", "also") that suggest a continuation from an earlier message. → Not present here, so false.
Topic Shift: It detects if there’s any indication that the user is shifting topics. → No such markers are found, so false.
Resulting Context Analysis: All flags (requiresContext, referencesHistory, continuesThread, and topicShift) are set to false.
6. Complexity Analysis Finally, the analyzer calculates some basic metrics about the message:
Length: Total number of characters. → For "i had panic attacks yesterday", the length is approximately 29 characters (depending on exact whitespace counting).
Word Count: The message splits into words as: ["i", "had", "panic", "attacks", "yesterday"] → 5 words
Average Word Length: Total letters divided by the word count. → (1 + 3 + 5 + 7 + 9) / 5 ≈ 5.0
Technical Term Count: Counts how many technical terms from the technology category are present. → None of these appear, so 0
7. Final AnalysisResult Putting it all together, the analyzer would output an AnalysisResult with the following components:
Topic Analysis:
mainTopic: "mental_health" confidence: ~0.58 relatedTopics: [] Emotion: "anxiety"
Intent: "statement"
Context Analysis:
requiresContext: false referencesHistory: false continuesThread: false topicShift: false Complexity Analysis:
length: ~29 wordCount: 5 averageWordLength: ~5.0 technicalTermCount: 0
Summary For the message "i had panic attacks yesterday", the analyzer would determine:
Topic: It falls under mental_health because of the detected keywords "panic attacks" and "panic". Emotion: It registers an anxiety sentiment. Intent: It is treated as a statement. Context & Complexity: It doesn’t require further context, and basic metrics like word count and average word length are computed. This logical breakdown demonstrates how the updated analyzer processes a message related to panic attacks and produces a structured analysis result.
Like this project

Posted Jun 20, 2025

Developed an analyzer for processing messages to help out people suffering with mental issues.