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

Use Llama 2 in watsonx conversational search #207

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

jwm4
Copy link
Member

@jwm4 jwm4 commented Sep 13, 2023

The Research team has done a big assessment and finds they get good overall accuracy with Llama 2 using the prompt template included in this update.

@jwm4 jwm4 requested a review from anibapat September 13, 2023 22:59
@anirudhaBapat
Copy link
Contributor

I tried this locally and it works! However I have seen a couple issues.

  1. There is a strikethrough on verbose
Screenshot 2023-09-13 at 5 35 31 PM
  1. I asked a question like - "When was Pinnacles National Park founded?"
    and it gave me an answer that was not at all present in the document that came back from the discovery, so this is a hallucination, but not sure if we can control that especially with the prompt given by a research team.
Screenshot 2023-09-13 at 5 41 39 PM

- `model_id`: The id of the watsonx model that you select for this action. Defaults to `google/flan-ul2`.
- `model_input`: The input to the watsonx model. You MAY change this to do prompt engineering, but a default will be used by the model if you don’t pass a prompt here.
- `model_id`: The id of the watsonx model that you select for this action. Defaults to `meta-llama/llama-2-70b-chat`. If you keep this default, be sure to comply with the [Acceptable Use Policy for this model](https://ai.meta.com/llama/use-policy/).
- `model_input`: The input to the watsonx model. This is set in an expression in Step 5 of the "Generate Answer" action. You MAY change that expression to do prompt engineering. If you wish to do so and are using the default model, be sure to research [guidelines for prompting Llama 2](https://www.pinecone.io/learn/llama-2/). In our experience, this combination of prompt and model is quite effective at producing high-quality answers when it has useful content and it does _often_ say that it doesn't know when it does not have useful content (as instructed in our prompt). However, it does _sometimes_ provide answers that are not supported by its evidence so consider other models, prompt expressions, or additional logic to reduce the generation of answers that are not
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it does sometimes provide answers that are not supported by its evidence so consider other models, prompt expressions, or additional logic to reduce the generation of answers that are not

That are not....? forgot something to add?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

@jwm4 jwm4 merged commit 7b0b480 into watson-developer-cloud:master Sep 14, 2023
1 check passed
@jwm4 jwm4 deleted the cs-llama-1 branch September 14, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants