You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/templates/elastic-query-generator
Erick Friis ebf998acb6
Templates (#12294)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Lance Martin <lance@langchain.dev>
Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
11 months ago
..
elastic_query_generator Templates (#12294) 11 months ago
tests Templates (#12294) 11 months ago
README.md Templates (#12294) 11 months ago
ingest.py Templates (#12294) 11 months ago
main.py Templates (#12294) 11 months ago
poetry.lock Templates (#12294) 11 months ago
pyproject.toml Templates (#12294) 11 months ago

README.md

elastic-query-generator

We can use LLMs to interact with Elasticsearch analytics databases in natural language.

This chain builds search queries via the Elasticsearch DSL API (filters and aggregations).

The Elasticsearch client must have permissions for index listing, mapping description and search queries.

Setup

Installing Elasticsearch

There are a number of ways to run Elasticsearch.

Elastic Cloud

Create a free trial account on Elastic Cloud.

With a deployment, update the connection string.

Password and connection (elasticsearch url) can be found on the deployment console.

> export ELASTIC_SEARCH_SERVER="https://elastic:<password>@<es-url>"

If you want to populate the DB with some example info, you can run `python ingest.py`.