Please check out this folder containing notebooks for Llama 3.1 implementation of text2 sql, along with Cloudformation templates to create the stack to run the notebooks.
This example covers accessing data across multiple tables in one MySQL or PostgreSQL instance. LLMs are accessed via:
- Bedrock using:
- Invoke API
- Converse API
- SageMaker Hosting; using:
- Predict API
Finally, ChromaDB is used a vector datastore. In addition to using the default embeddings, the notebook includes example of:
- Amazon SageMaker BGE Large English model (deployed on Amazon SageMaker)
- Amazon Titan Embedding V2 (via Amazon Bedrock)
Please follow:
- llama3-1-chromadb-text2sql-DB-Setup.ipynb for sample DB setup
- llama3-1-chromadb-text2sql.ipynb to review the code.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.