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

After creating a view, the answer generated does not indicate that it originates from a view #880

Open
wwwy3y3 opened this issue Nov 7, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@wwwy3y3
Copy link
Member

wwwy3y3 commented Nov 7, 2024

Describe the bug
In version 0.10.0, after creating a view, the answer generated does not indicate that it originates from a view.

To Reproduce
Steps to reproduce the behavior:

  1. Go to home
  2. Create a view
  3. Ask a questions same with the question we saved as a view
  4. Observe that the answer does not indicate it comes from the view.

Expected behavior
The response should clearly indicate if it originates from a view to provide transparency about the data source.

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome

Wren AI Information

  • Version: 0.10.0
  • LLM_PROVIDER= openai
  • GENERATION_MODEL= gpt-4o-mini
@wwwy3y3 wwwy3y3 added the bug Something isn't working label Nov 7, 2024
@wwwy3y3 wwwy3y3 moved this to Backlog in Wren AI Public Roadmap Nov 7, 2024
@wwwy3y3 wwwy3y3 moved this from Backlog to Next in Wren AI Public Roadmap Nov 7, 2024
@AryanK1511
Copy link
Contributor

@wwwy3y3 This looks interesting to me. Can I give it a shot? I am not sure whether I would be able to get it to work or not but I want to try this. Are you able to assign this issue for me so that I can start working on it?

@wwwy3y3
Copy link
Member Author

wwwy3y3 commented Nov 15, 2024

@AryanK1511 of course! thanks a lot.

We implemented this feature before, but it seems not working as expected right now.

As you could see from the UI logics here:

{isViewSaved ? (
<div className="mt-2 gray-6 text-medium">
<FileDoneOutlined className="mr-2" />
Generated from saved view{' '}
<Link
className="gray-7"
href={`${Path.Modeling}?viewId=${view.id}&openMetadata=true`}
target="_blank"
rel="noreferrer noopener"
>
{view.displayName}
</Link>
</div>
) : (
<Button
className="mt-2 gray-6"
type="text"
size="small"
icon={<SaveOutlined />}
onClick={() =>
onOpenSaveAsViewModal({
sql: fullSql,
responseId: threadResponseId,
})
}
>
Save as View
</Button>
)}

it should show Generated from saved view ${view name} and clicking the view name will redirect users to the view page.

We suspect that since we change the flow of asking questions, we might break sth here.

If the answer comes from a view, the thread response here should have a view property:

type ThreadResponseDetail {
view: ViewInfo
sql: String
description: String
steps: [DetailStep!]!
}

@cyyeh, Jimmy you could share more about how AI service API works here. Might help @AryanK1511 solving this issue.

@wwwy3y3
Copy link
Member Author

wwwy3y3 commented Nov 15, 2024

@AryanK1511 assigned to you. Let us know if you have any questions

@cyyeh
Copy link
Member

cyyeh commented Nov 15, 2024

@AryanK1511 Hi, for AskResult type, you could get AskCandidateType inside, there are two types of value: view or llm. if it's view, you could also get viewId in the AskResult.

export type AskResult = AskResponse<

@AryanK1511
Copy link
Contributor

Cool! I'll look into this. Thank you so much for assigning this issue to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Next
Development

No branches or pull requests

3 participants