Oracle AI Optimizer and Toolkit
If you find this project useful, please consider giving it a ⭐!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) and Natural Language to SQL (NL2SQL) capabilities. By integrating Oracle AI Database VectorSearch and SQLcl MCP, the AI Optimizer and Toolkit enables users to extend the knowledge of existing Large Language Models (LLMs) through RAG and NL2SQL.
Technology Stack
- Application: Python 3.12–3.14, Streamlit client, and FastAPI/Uvicorn server.
- AI orchestration: LangChain, LangGraph, LiteLLM, AgentSpec/pyagentspec, and Model Context Protocol (MCP).
- Oracle integration: Oracle AI Database Vector Search, Oracle Deep Data Security, SQLcl MCP, OCI, OCI GenAI, and OCI Object Storage.
- RAG and evaluation: Docling, OracleDB/LangChain vector integrations, Giskard v3 testbed checks, and FAISS-backed local vector workflows.
- Model providers and runtimes: OCI GenAI, OpenAI-compatible APIs, OpenAI, Cohere, Perplexity, Ollama, Hugging Face, vLLM, and TGI-style hosted runtimes.
- Deployment and operations: Docker/Podman, Kubernetes, Helm, OpenTofu infrastructure automation, OpenTelemetry, and SigNoz.
AI Optimizer Features
- 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
- Managing Oracle Deep Data Security policies
Getting Started
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.
Prerequisites
- Oracle AI Database incl. Oracle AI Database Free
- uv (for running Bare-Metal)
- Container Runtime e.g. docker/podman (for running in a Container)
- Access to an Embedding and Chat Model:
\*Oracle recommends running On-Premises Models on hardware with GPUs.
Bare-Metal Installation
To run the application on bare-metal; download the source:
- Create the project environment and install the application:
uv sync --all-extras
- Configure Settings:
cp src/.env.example src/.env.dev
Edit the src/.env.dev file and set your default configuration.
To utilize database functionality, at a minimum, set the AIO_DB_* parameters.
- Start Streamlit:
uv run python src/entrypoint.py client
- Navigate to
http://localhost:8501.
- Configure the AI Optimizer.
Container Installation
To run the application in a container; download the source:
- Build the all-in-one image.
--arch amd64
podman 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.
Got OCI?
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: [![Deploy to Oracle Cloud][magic_button]][magic_arch_stack]
For more information, please visit the IaC Documentation.
Contributing
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Security
Please consult the security guide for our responsible security vulnerability disclosure process.
License
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.
[magic_button]: https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg [magic_arch_stack]: https://cloud.oracle.com/resourcemanager/stacks/create?zipUrl=https://github.com/oracle/ai-optimizer/releases/latest/download/ai-optimizer-iac.zip