Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q&A Function - Feedback when there is not enough Context provided #794

Closed
capgeminichristianerling opened this issue Apr 26, 2024 · 2 comments

Comments

@capgeminichristianerling

Is your feature request related to a problem? Please describe.
See Issue 789.

In the functions:

  • LongContextChunkQA
  • MultipleChunkQA
  • SingleChunkQA

It happens for some questions, when there is not enough information/context provided, that the Intelligence Layer returns NULL as a response. See Issue 789

Describe the solution you'd like

As a solution some feedback provided for the user if there is not enough information/context provided to answer a question, instead of an empty value returned by the Intelligence layer.

This could be a sentence returned by the Intelligence Layer such as:
I'm very sorry, I do not have enough information provided to answer your question, please provide more information.

@pacman82
Copy link
Collaborator

Hello @capgeminichristianerling ,

part of the charm of the Intelligence Layer SDK is that you can adapt it to your specific needs. Feel free to take this code as a start point and adapt it to your use case.

Here is our reasoning why we like the fact of returning None vs a specific answer. For the most part it is easier to test in front end code for None in order to figure out something went wrong, as opposed to testing for a long custom string. A UI might decide to do more things differently in absence of a "good" answer, then just displaying a different text. Also then dealing with multiple languages such hardcoded strings are a hassle.

This is of course true for the use cases we have in mind and having always an answer might be precisely the right thing in yours. Even without "forking" our QA code, you have also the option to creating a wrapping task, which replaces the None with a hard coded string of your liking.

Best, Markus

@pacman82
Copy link
Collaborator

Just pinging our Product Managment, so they are aware @wolfgangihloff .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants