Skip to content

§Intent Classification: Inconsistent Responses #1

@TahaTobaili

Description

@TahaTobaili

User Experience:

As the user is watching the video, they can chat with AiDA about it. Their questions, might require an in depth response aided by a nice chart or it might be a simple response. Hence, a chart is not always necessary in this case.

What needs to be done:

To mitigate this redundancy, a nice way is to classify the user's intent, as a start if they are looking for a summary then yes generate a chart and audio file (text-to-speech) as well.

For that check function classify_intent(user_input) it attempts to classify whether the user is requesting a summary or something else via a ChatGPT call. The responses are inconsistent and not always accurate.

To address this, the following steps need to be implemented:

  1. Prompt: We need to make sure ChatGPT response is precisely "True" or "False" to treat the output as a boolean with ast.literal_eval(response.content). It might be that GPT is responding with something like "true" or "true.." or "yes, it is a summary" or the like. Keep playing with the prompt to reach consistent output.

  2. Function Calling: Use a json schema and function calling to return the response to a specific json key, read this.

    Bonus Points: Figure out Function Calling in LangChain!

  3. Testing Robustness: Need to be tested sufficiently to confirm that the intent is correctly classified as "True" if request relates to a summary or "False" for anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions