Inference Logic

Tracy's Logical Flow

When Tracy receives a user's question, the following steps are taken to generate an answer:

  1. Intent Assessment: Determine whether the question is related to the NBA.

  2. Question Decomposition and Rewriting: If the question is NBA-related, attempt to decompose and rewrite it. This process involves referencing predefined NBA domain knowledge and question templates.

  3. Retrieval Based on Question Type: Once the question is decomposed, it is categorized into one of two types—data-related or information-related:

  4. NL-to-SQL (NL2SQL)

    • For data-related questions, use NL2SQL to translate the question into a database query (SQL). This step references the database's DDL and predefined SQL templates.

    • For information-related questions, retrieve relevant information through a knowledge base or online search.

  5. Synthesis and Answer Generation: Compile all collected information and utilize a llm to generate the final answer based on the user's original question.

Last updated