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

No answers to questions #24

Open
gsuttie opened this issue Oct 16, 2024 · 4 comments
Open

No answers to questions #24

gsuttie opened this issue Oct 16, 2024 · 4 comments

Comments

@gsuttie
Copy link

gsuttie commented Oct 16, 2024

Within the data folder there are a number of pdfs but if i ask questions like the ones in the video they dont knwo the answer - how do i check this and how would i upload my own data for me to be able to ask it questions on say a pdf i uploaded myself?

@pamelafox
Copy link
Collaborator

In our experience, we've found that this model requires more prompting to decide to search the knowledge base. For example, with the sample data, I always say "Hello", and then once they respond, I ask "What is the whistleblower policy for Contoso Electronics?"

We need to experiment with more prompt engineering or perhaps few-shot examples to get it to more reliably search the knowledge base.

To upload your own data, assuming you used "azd up" for deploying from scratch:
add the files to the data/ folder, then rerun ./scripts/setup_intvect.ps1 or ./scripts/setup_invect.sh

@gsuttie
Copy link
Author

gsuttie commented Oct 16, 2024

Awesome thank you!

@Piesson
Copy link

Piesson commented Oct 28, 2024

I'm trying to find a better way to prompt an AI model to search the knowledge base more often or always. I've tried changing the tool_choice from "auto" to "required" and using {"type": "function", "function": {"name": "search"}}, but these either caused endless loops or didn't work at all. Do you have any insights or suggestions on how to handle this? I'd really appreciate your help!

@pamelafox
Copy link
Collaborator

@Piesson I haven't done much prompt engineering for this RAG app, but for others using function calling, I've found it helpful to provide few-shot examples. Here's an example of the format: https://github.com/Azure-Samples/rag-postgres-openai-python/blob/main/src/backend/fastapi_app/prompts/query_fewshots.json
It would need to match the format of the search tool used in this app.

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