|
| 1 | +# AI RAG in a BOX Demo using Oracle Autonomous Database 23ai and Local LLMs |
| 2 | + |
| 3 | +## Introduction |
| 4 | + |
| 5 | +An innovative RAG (Retrieval Augmented Generation) system designed to leverage an LLM agent for effective information retrieval and response generation. |
| 6 | + |
| 7 | +This system efficiently processes various document formats and intelligently selects the appropriate knowledge base based on user queries. |
| 8 | + |
| 9 | +The AI RAG in a BOX Demo utilizing the Internal LLM Engine "Ollama" is deployable via Podman across multiple platforms, including Mac OSX, Windows, and Linux. |
| 10 | + |
| 11 | +AI RAG in a BOX Demo using Internal LLM Engine "Ollama" can be deployed in Podman on your PC - Mac OSX (Intel or ARM), Windows (Intel or ARM), or Linux. |
| 12 | + |
| 13 | +This solution includes 2 containers: |
| 14 | +- Oracle Database 23ai |
| 15 | +- AIRAG Container |
| 16 | + |
| 17 | +## 1. Install the containers |
| 18 | + |
| 19 | +#### Windows Deployment |
| 20 | + |
| 21 | +1. Install Podman in Windows |
| 22 | + - Follow the installation guide [here](https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md) |
| 23 | + - See detailed tutorial for [Windows Installation](./install_win_llama3_db23ai.md) |
| 24 | + |
| 25 | +2. Install Containers |
| 26 | + - Deploy using the script: [install_airagdb23ai_win.bat](./scripts/install_airagdb23ai_win.bat) |
| 27 | + |
| 28 | +#### Mac OSX Deployment |
| 29 | + |
| 30 | +- Deploy using the script. You can check all the steps which are commented in the script: [install_airagdb23ai_macosx.sh](./scripts/install_airagdb23ai_macosx.sh) |
| 31 | + |
| 32 | +#### Linux Deployment |
| 33 | + |
| 34 | +- Deploy using the script: [install_airagdb23ai_linux.sh](./scripts/install_airagdb23ai_linux.sh) |
| 35 | + |
| 36 | +## 2.Verifying Installation |
| 37 | + |
| 38 | +1. Check Podman network: |
| 39 | + |
| 40 | +```bash |
| 41 | +podman network ls |
| 42 | +``` |
| 43 | + |
| 44 | +2. Verify downloaded images: |
| 45 | + |
| 46 | +```bash |
| 47 | +podman images |
| 48 | +``` |
| 49 | + |
| 50 | +3. Check running containers: |
| 51 | +```bash |
| 52 | +podman ps |
| 53 | +``` |
| 54 | + |
| 55 | +4. Check container logs: |
| 56 | +```bash |
| 57 | +podman logs -f 23aidb |
| 58 | +podman logs -f airagdb23aiinbox |
| 59 | +``` |
| 60 | + |
| 61 | +5. Connect to the database: |
| 62 | +```bash |
| 63 | +podman exec -it 23aidb sqlplus VECDEMO/<pwd>@FREEPDB1 |
| 64 | +``` |
| 65 | + |
| 66 | +## Appendix: Troubleshooting |
| 67 | + |
| 68 | +### Database Connection |
| 69 | + |
| 70 | +To verify database functionality for the user `VECDEMO`: |
| 71 | + |
| 72 | +```bash |
| 73 | +podman exec -it 23aidb sqlplus VECDEMO/<pwd>@FREEPDB1 |
| 74 | +``` |
| 75 | + |
| 76 | +### HuggingFace Embeddings Error |
| 77 | + |
| 78 | +If you encounter this error: |
| 79 | + |
| 80 | +```bash |
| 81 | +OSError: We couldn't connect to 'https://huggingface.co' to load this file... |
| 82 | +``` |
| 83 | +
|
| 84 | +Restart the container: |
| 85 | +
|
| 86 | +```bash |
| 87 | +podman stop airagdb23aiinbox |
| 88 | +podman start airagdb23aiinbox |
| 89 | +``` |
| 90 | +
|
| 91 | +## Contributing |
| 92 | +
|
| 93 | +This project is open source. Please submit your contributions by forking this repository and submitting a pull request! Oracle appreciates any contributions that are made by the open source community. |
| 94 | +
|
| 95 | +## License |
| 96 | +
|
| 97 | +Copyright (c) 2024 Oracle and/or its affiliates. |
| 98 | +
|
| 99 | +Licensed under the Universal Permissive License (UPL), Version 1.0. |
| 100 | +
|
| 101 | +See [LICENSE](../LICENSE) for more details. |
| 102 | +
|
| 103 | +ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK. |
0 commit comments