Skip to content

Pihu's End-to-End Process: Answering the Question

Example User Question for Pihu:

"Compare the overall liking of SLHB5 and SLHB8 from the Signature Latte Cold V2 study. Did SLHB8 meet the benchmark, and what were the main aroma notes for it among millennials?"


Pihu's End-to-End Process: Answering the Example Question

Here's how Pihu uses the different Knowledge Base modules to arrive at the answer:

1. Understanding the User's Request (Query Understanding Agent)

  • User Says: "Compare the overall liking of SLHB5 and SLHB8 from the Signature Latte Cold V2 study. Did SLHB8 meet the benchmark, and what were the main aroma notes for it among millennials?"
  • Module A (Sensory Lexicon) is used to:
    • Recognize "overall liking" as a standard hedonic measure (ATTR_LIKING_OVERALL_001).
    • Understand "aroma notes" refers to specific olfactory descriptors, likely from a CATA list (ATTR_AROMA_NOTE_CATA_001).
  • Module D (General Vocabulary) is used to:
    • Identify keywords like "Compare," "meet the benchmark," "main aroma notes," and "millennials" to determine the user's multiple intents (comparison, benchmark evaluation, descriptor listing, demographic filtering).
  • Output: A structured breakdown of the query, identifying products (SLHB5, SLHB8), the study ("Signature Latte Cold V2 study"), attributes ("overall liking," "aroma notes"), the demographic filter ("millennials"), and the distinct tasks required.

    • Why these modules? To translate natural language into a precise, machine-understandable format. Without them, Pihu wouldn't know what "liking" or "aroma notes" refer to in a sensory context.

2. Planning the Analysis (Analysis Planning Agent)

  • Input: The structured query from the previous step.
  • Output: A high-level plan:
    1. Identify the specific database IDs for the study and products.
    2. Find how "overall liking" and "aroma notes" were measured in that specific study.
    3. Retrieve "overall liking" scores for SLHB5 and SLHB8, filtered for "millennials."
    4. Retrieve the benchmark rule for "overall liking."
    5. Compare SLHB8's "overall liking" score (millennials) against the benchmark.
    6. Retrieve "aroma notes" data for SLHB8, filtered for "millennials," and identify the top ones.
    7. Combine all findings into a coherent answer.
  • Why this step? To create a logical sequence of actions before diving into data retrieval or complex lookups.

3. Linking Concepts to Specific Data (Data Linking Agent - The "GPS")

  • Input: The plan and structured query.
  • Module C (Collaboration Data & Question Library) is CRITICAL here:
    • productAndCollaborationCatalog:
      • Maps "Signature Latte Cold V2 study" to its internal ID, e.g., COLLAB_SLC_V2_JAN24.
      • Within COLLAB_SLC_V2_JAN24, maps "SLHB5" to databaseProductIdForCollab: 1498 and "SLHB8" to databaseProductIdForCollab: 1497.
    • collaborationQuestionLibrary (for COLLAB_SLC_V2_JAN24):
      • For "overall liking" (ATTR_LIKING_OVERALL_001 from Module A): The agent semantically searches questions in this study. It finds a match: databaseQuestionId: 43449 (text: "Overall, how much do you LIKE..."), sectionName: PRODUCT EXPERIENCE, responseValueColumn: option_value_numeric, and its 9-point hedonic responseOptions (scale anchors).
      • For "aroma notes" (ATTR_AROMA_NOTE_CATA_001 from Module A): It semantically searches again. It finds databaseQuestionId: 43417 (text: "Which of these sensations..."), sectionName: AROMA, responseValueColumn: selected_option_text, and, crucially, the list of actual responseOptions (e.g., "Coffee-Roast," "Dairy," etc.) that were presented to panelists for this question in this study.
    • demographicSegmentMappings:
      • Maps "millennials" to the database filter: Respondents.generation = 'Gen Y'.
  • Module B (Business Rules) is used to:
    • Identify the relevant benchmark rule for "overall liking" (e.g., BM_LIKING_TAGTASTE_STD_001) by checking its appliesTo criteria.
  • Output: An "enriched plan" with all specific database identifiers (collaboration ID, product IDs, QIDs, column names), the exact aroma notes list for QID 43417, the demographic filter details, and the ID of the benchmark rule to apply.

    • Why these modules? Module C is the bridge. It tells Pihu where to find the data for "overall liking of SLHB5" in the specific "Signature Latte Cold V2 study" and what the actual aroma options were. Module B identifies the correct performance standard. Without C, Pihu is lost.

4. Retrieving & Processing Data (SQL/Code Generation & Execution Agents)

  • Input: The enriched plan from Data Linking.
  • Process:
    • SQL queries are generated to fetch:
      • Average option_value_numeric for QID 43449 for product 1498 (SLHB5) where generation = 'Gen Y' in COLLAB_SLC_V2_JAN24.
      • Average option_value_numeric for QID 43449 for product 1497 (SLHB8) where generation = 'Gen Y' in COLLAB_SLC_V2_JAN24.
      • Counts of each selected_option_text (from the responseOptions list identified in Module C for QID 43417) for product 1497 (SLHB8) where generation = 'Gen Y' in COLLAB_SLC_V2_JAN24.
    • These queries are run against the database.
    • (If a statistical comparison like a t-test was needed for the liking scores, Python code would be generated and run here.)
  • Output: Raw results (e.g., SLHB5 liking = 7.10, SLHB8 liking = 7.05; Aroma Notes for SLHB8: Coffee-Roast: 15 counts, Dairy: 9 counts, etc.).

    • Why this step? To get the actual numbers from the database based on the precise instructions derived from the KB.

5. Synthesizing and Explaining the Answer (Response Synthesis Agent)

  • Input: Raw results from data retrieval, the benchmark rule ID, and the original query context.
  • Module B (Business Rules) is used to:
    • Take SLHB8's liking score (e.g., 7.05) and compare it against the bands in benchmark rule BM_LIKING_TAGTASTE_STD_001. It finds 7.05 falls into the "Exceeds Expectations" band (e.g., 6.80-7.29).
  • Module D (Explainability, Communication & Reporting Standards) is used to:
    • Standard Interpretation Phrases: To phrase the benchmark result (e.g., "SLHB8's score of 7.05 Exceeds Expectations...").
    • Reporting Standards & Formatting Guidelines:
      • To format scores to two decimal places (7.10, 7.05).
      • To explain the 9-point liking scale context.
      • To list the top aroma notes with percentages in the standard format (e.g., "Coffee-Roast (52%), Dairy (30%)" after calculating percentages from counts).
      • To use standard phrasing for statistical significance if a t-test was run.
    • Pihu Persona & Tone: To ensure the language is helpful, analytical, and professional.
  • Output (The final answer presented to the user): "For the Signature Latte Cold V2 study, when comparing overall liking among millennials (on a 9-point scale where 9=Like Extremely):

    • SLHB5 had a mean score of 7.10.
    • SLHB8 had a mean score of 7.05. (Optional: The difference was not statistically significant, p=0.XX).

    Regarding the benchmark, SLHB8's overall liking score of 7.05 Exceeds Expectations based on the TagTaste standard (target >= 6.80).

    The main aroma notes mentioned for SLHB8 by millennials were:

    1. Coffee-Roast (52%)
    2. Dairy (30%)
    3. Sugary (25%)"
  • Module D (Provenance & Explainability Templates) is used for "Show Details":

    • This panel would list: the study ID used (COLLAB_SLC_V2_JAN24), product IDs (1498, 1497), QIDs used (43449 for liking, 43417 for aroma), the demographic filter applied (generation = 'Gen Y'), the benchmark rule applied (BM_LIKING_TAGTASTE_STD_001 and its "Exceeds Expectations" band definition), and the actual SQL queries.

    • Why these modules? To transform raw data into a meaningful, easy-to-understand, and trustworthy answer, presented according to TagTaste's communication standards. Module B provides the evaluative logic, and Module D provides the language and formatting.


In a Nutshell - Why We Use Them for This Question:

  • Module A (Lexicon): To know what "overall liking" and "aroma notes" are conceptually.
  • Module B (Business Rules): To know how to judge if "CLB8 met the benchmark."
  • Module C (Mapping/Library): To find where the specific data for "overall liking of SLHB5/SLHB8" and the list of possible "aroma notes" are located for the "Signature Latte Cold V2 study." This is the key to connecting the general question to specific data.
  • Module D (Explainability/Reporting): To construct and format the final answer clearly, consistently, and explain the process if asked.

This flow demonstrates that while Module C is pivotal for locating the correct data within a specific study (especially with your revised, more scalable structure), all modules play an indispensable role in delivering a comprehensive, accurate, and explainable answer.