The Oracle AI Optimizer and Toolkit (the AI Optimizer) provides a streamlined environment where developers and data scientists can explore the potential of Generative Artificial Intelligence (GenAI) combined with Retrieval-Augmented Generation (RAG) capabilities. By integrating Oracle AI Database VectorSearch and SelectAI, the Sandbox enables users to enhance existing Large Language Models (LLMs) through RAG.
If you find this project useful, please consider giving it a ⭐!
- Configuring Embedding and Chat Models
- Splitting and Embedding Documentation
- Auto-refresh Vector Store from OCI Object Storage buckets
- Modifying System Prompts (Prompt Engineering)
- Experimenting with LLM Parameters
- Testbed for auto-generated or existing Q&A datasets
The AI Optimizer is available to install in your own environment, which may be a developer's desktop, on-premises data center environment, or a cloud provider. It can be run either on bare-metal, within a container, or in a Kubernetes Cluster.
For more information, including more details on Setup and Configuration please visit the documentation.
- Oracle AI Database incl. Oracle AI Database Free
- Python 3.11 (for running Bare-Metal)
- Container Runtime e.g. docker/podman (for running in a Container)
- Access to an Embedding and Chat Model:
- API Keys for Third-Party Models
- On-Premises Models*
*Oracle recommends running On-Premises Models on hardware with GPUs. For more information, please review the Infrastructure documentation.
To run the application on bare-metal; download the source:
-
Create and activate a Python Virtual Environment:
python3.11 -m venv .venv --copies source .venv/bin/activate pip3.11 install --upgrade pip wheel setuptools uv -
Install the Python modules:
uv pip install -e ".[all]" -
Configure Settings:
cp src/.env.example src/.env.dev
Edit the
src/.env.devfile and set your default configuration.
To utilize database functionality, at a minimum, set theAIO_DB_*parameters. -
Start Streamlit:
src/entrypoint.py client
-
Navigate to
http://localhost:8501. -
Configure the AI Optimizer.
To run the application in a container; download the source:
-
Build the all-in-one image.
Note: MacOS Silicon users may need to specify
--arch amd64podman build -f src/Dockerfile -t ai-optimizer-aio . -
Start the Container:
podman run -p 8501:8501 -it --rm ai-optimizer-aio
-
Navigate to
http://localhost:8501. -
Configure the AI Optimizer.
The AI Optimizer can be deployed in Oracle Cloud Infrastructure (OCI) using Infrastructure as Code (IaC).
Choose either a light-weight Virtual Machine or robust Oracle Kubernetes Engine deployment, both with an Oracle Autonomous Database:
For more information, please visit the IaC Documentation.
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Please consult the security guide for our responsible security vulnerability disclosure process.
Copyright (c) 2024 Oracle and/or its affiliates. Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/
See LICENSE for more details.