-
Notifications
You must be signed in to change notification settings - Fork 165
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
Adding notebook for function calling with Elasticsearch #250
Conversation
Found 1 changed notebook. Review the changes at https://gitnotebooks.com/elastic/elasticsearch-labs/pull/250 |
"id": "6dc83930-89c0-465b-9002-e6aa0d3f5e6f", | ||
"metadata": {}, | ||
"source": [ | ||
"### Generate Elasticsearch Query DSL based on user query" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth looking into few-shot prompting so you can provide examples on the types of queries you want it to return. This should increase consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Joe, I think adding this suggestion as side note in the blog would be better. Indeed its great suggestion but performing NL query is one of the part. As I tested it working for most of the basic query i.e search, aggs. Let me know your thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! Likely it will work fine as is and yes mention in blog that we are relying on the model's own knowledge to generate the queries but we can increase reliability with few shot for more complex queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good input. Thanks Joe
"### Open AI\n", | ||
"\n", | ||
"`OPENAI_API_KEY`: Setup an [Open AI account and create a secret key](https://platform.openai.com/docs/quickstart). \n", | ||
"`GPT_MODEL`: We’re going to use the `gpt-4-1106-vision-preview` model but you can check [here](https://platform.openai.com/docs/guides/function-calling) which model is being supported for function calling.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth using gpt-4o instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was about to change this. Updating with gpt-4o
.
Adding a notebook for integrating OpenAI function calling with Elasticsearch