Skip to content

Commit 13e667f

Browse files
Merge pull request #45 from oracle-devrel/feature/memory-context-engineering-notebook
Feature/memory context engineering notebook
2 parents bc70203 + 13bf78b commit 13e667f

File tree

272 files changed

+26375
-2700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+26375
-2700
lines changed

.gitignore

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,14 @@ terraform.rc
6565

6666
# Node
6767
node_modules/
68+
npm-debug.log*
69+
yarn-debug.log*
70+
yarn-error.log*
71+
.pnpm-debug.log*
72+
.npm
73+
.eslintcache
6874

69-
# Java
75+
# Java
7076
.gradle
7177
build/
7278
!gradle/wrapper/gradle-wrapper.jar
@@ -75,4 +81,63 @@ build/
7581
.idea
7682
bin/
7783
dist/
78-
application-local.yaml
84+
application-local.yaml
85+
86+
# Python
87+
__pycache__/
88+
*.py[cod]
89+
*$py.class
90+
*.so
91+
.Python
92+
env/
93+
venv/
94+
ENV/
95+
develop-eggs/
96+
downloads/
97+
eggs/
98+
.eggs/
99+
lib/
100+
lib64/
101+
parts/
102+
sdist/
103+
var/
104+
wheels/
105+
*.egg-info/
106+
.installed.cfg
107+
*.egg
108+
109+
# IDEs
110+
.vscode/
111+
*.swp
112+
*.swo
113+
*~
114+
115+
# Jupyter Notebook
116+
.ipynb_checkpoints
117+
118+
# Environment variables
119+
.env
120+
.env.local
121+
.env.*.local
122+
123+
# Pre-commit
124+
.pre-commit-config.yaml.bak
125+
126+
# Build artifacts
127+
*.min.js
128+
*.min.css
129+
*.map
130+
131+
# Logs
132+
*.log
133+
logs/
134+
135+
# Temporary files
136+
*.tmp
137+
*.temp
138+
.cache/
139+
140+
# Oracle specific
141+
*.classpath
142+
*.project
143+
.settings/

.pre-commit-config.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Pre-commit hooks configuration
2+
# See https://pre-commit.com for more information
3+
4+
repos:
5+
# Ruff - Fast Python linter and formatter
6+
- repo: https://github.com/astral-sh/ruff-pre-commit
7+
rev: v0.1.15
8+
hooks:
9+
# Run the linter
10+
- id: ruff
11+
args: [--fix, --exit-non-zero-on-fix]
12+
# Run the formatter
13+
- id: ruff-format
14+
15+
# Prettier - Code formatter for JavaScript, TypeScript, JSON, YAML, etc.
16+
- repo: https://github.com/pre-commit/mirrors-prettier
17+
rev: v4.0.0-alpha.8
18+
hooks:
19+
- id: prettier
20+
types_or: [javascript, jsx, ts, tsx, json, yaml, markdown]
21+
exclude: |
22+
(?x)^(
23+
.*\.min\.js|
24+
.*\.min\.css|
25+
node_modules/.*|
26+
.*\.lock
27+
)$
28+
29+
# General file checks
30+
- repo: https://github.com/pre-commit/pre-commit-hooks
31+
rev: v4.5.0
32+
hooks:
33+
- id: trailing-whitespace
34+
- id: end-of-file-fixer
35+
- id: check-yaml
36+
args: [--allow-multiple-documents]
37+
- id: check-json
38+
- id: check-added-large-files
39+
args: ["--maxkb=2000"]
40+
- id: check-merge-conflict
41+
- id: detect-private-key

.prettierignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Dependencies
2+
node_modules/
3+
package-lock.json
4+
yarn.lock
5+
6+
# Build outputs
7+
dist/
8+
build/
9+
*.min.js
10+
*.min.css
11+
12+
# Generated files
13+
*.map
14+
15+
# Lock files
16+
pnpm-lock.yaml
17+
18+
# Jupyter notebooks (can be formatted separately if needed)
19+
*.ipynb

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"endOfLine": "auto"
11+
}

README.md

Lines changed: 109 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,115 @@
1-
# OCI Generative AI toolkit
1+
# Oracle AI Developer Hub
22

3-
[![License: UPL](https://img.shields.io/badge/license-UPL-green)](https://img.shields.io/badge/license-UPL-green) [![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=oracle-devrel_oci-generative-ai-jet-ui)](https://sonarcloud.io/dashboard?id=oracle-devrel_oci-generative-ai-jet-ui)
3+
This repository contains technical resources to help AI Developers build AI applications, agents, and systems using Oracle AI Database and OCI services alongside other key components of the AI/Agent stack.
44

5+
## What You'll Find
56

6-
## Introduction
7+
This repository is organized into several key areas:
78

8-
Using Oracle JET, create a user-friendly prompt-led user interface (UI) to interact with Oracle's new Generative AI service. This toolkit will configure your Generative AI Service connection so you can begin your journey with AI, or migrate your existing (local or Cloud) LLMs to the Oracle AppDev ecosystem.
9-
[Enhance Engagement Using Content Generation with OCI Generative AI](JET.md)
9+
### 📱 **Apps** (`/apps`)
1010

11-
This project deploys an AI pipeline with a multipurpose front end for text generation and summarization. The pipeline integrates with a database to track interactions, enabling fine-tuning and performance monitoring for application optimization. It leverages OCI Generative AI APIs on a Kubernetes cluster.
12-
[Accelerating AI Application Deployment Using Cloud Native Strategies](K8S.md)
11+
Applications and reference implementations demonstrating how to build AI-powered solutions with Oracle technologies. These complete, working examples showcase end-to-end implementations of AI applications, agents, and systems that leverage Oracle AI Database and OCI services. Each application includes source code, deployment configurations, and documentation to help developers understand architectural patterns, integration approaches, and best practices for building production-grade AI solutions.
12+
13+
| Name | Description | Link |
14+
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
15+
| oci-generative-ai-jet-ui | Full-stack AI application with Oracle JET UI, OCI Generative AI integration, Kubernetes deployment, and Terraform infrastructure | [![View App](https://img.shields.io/badge/View%20App-blue?style=flat-square)](./apps/oci-generative-ai-jet-ui) |
16+
17+
### 📓 **Notebooks** (`/notebooks`)
18+
19+
Jupyter notebooks and interactive tutorials covering:
20+
21+
- AI/ML model development and experimentation
22+
- Oracle Database AI features and capabilities
23+
- OCI AI services integration patterns
24+
- Data preparation and analysis workflows
25+
- Agent development and orchestration examples
26+
27+
| Name | Description | Stack | Link |
28+
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
29+
| memory_context_engineering_agents | Build AI agents with 6 types of persistent memory. Covers memory engineering, context window management, and just-in-time retrieval patterns. | LangChain, Oracle AI Database, OpenAI, Tavily | [![Open Notebook](https://img.shields.io/badge/Open%20Notebook-orange?style=flat-square)](./notebooks/memory_context_engineering_agents.ipynb) |
30+
| oracle_rag_agents_zero_to_hero | Learn to build RAG agents from scratch using Oracle AI Database. | Oracle AI Database, OpenAI, OpenAI Agents SDK | [![Open Notebook](https://img.shields.io/badge/Open%20Notebook-orange?style=flat-square)](./notebooks/oracle_rag_agents_zero_to_hero.ipynb) |
31+
| oracle_rag_with_evals | Build RAG systems with comprehensive evaluation metrics | Oracle AI Database, OpenAI, BEIR, Galileo | [![Open Notebook](https://img.shields.io/badge/Open%20Notebook-orange?style=flat-square)](./notebooks/oracle_rag_with_evals.ipynb) |
32+
33+
### 🎓 **Workshops** (`/workshops`)
34+
35+
Hands-on workshops and guided learning experiences:
36+
37+
- Step-by-step tutorials for building AI applications
38+
- End-to-end project walkthroughs
39+
- Best practices and architectural patterns
40+
- Integration guides for Oracle AI Database and OCI services
41+
42+
| Name | Description | Link |
43+
| ------------- | ---------------------------- | ---- |
44+
| _Coming soon_ | Workshops will be added here | - |
45+
46+
### 📚 **Guides** (`/guides`)
47+
48+
Comprehensive documentation and reference materials:
49+
50+
- Architecture patterns and design guides
51+
- API documentation and integration examples
52+
- Deployment and operations guides
53+
- Troubleshooting and optimization tips
54+
- Security and compliance best practices
55+
56+
| Name | Description | Link |
57+
| ------------- | ------------------------- | ---- |
58+
| _Coming soon_ | Guides will be added here | - |
59+
60+
### 🤝 **Partners** (`/partners`)
61+
62+
Notebooks and apps contributed by partners in the AI ecosystem. AI Developers can use these resources to understand how to use Oracle AI Database and OCI alongside tools such as LangChain, Galileo, LlamaIndex, and other popular AI/ML frameworks and platforms.
63+
64+
| Name | Description | Stack | Link |
65+
| ------------- | ------------------------------------------------ | ----- | ---- |
66+
| _Coming soon_ | Partner-contributed resources will be added here | - | - |
67+
68+
## Getting Started
69+
70+
1. **Explore Applications**: Start with the applications in `/apps` to see complete, working examples
71+
2. **Follow Workshops**: Check `/workshops` for guided learning paths
72+
3. **Experiment with Notebooks**: Use `/notebooks` for hands-on experimentation
73+
4. **Reference Guides**: Consult `/guides` for detailed documentation
74+
5. **Check Partner Resources**: Explore `/partners` for integrations with popular AI tools and frameworks
1375

1476
## Contributing
1577

16-
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.
78+
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.
79+
80+
### Development Setup
81+
82+
Before contributing, please set up pre-commit hooks to ensure code is automatically formatted:
83+
84+
1. **Install pre-commit**:
85+
86+
```bash
87+
pip install pre-commit
88+
```
89+
90+
2. **Install additional dependencies** (optional, includes pre-commit and ruff):
91+
92+
```bash
93+
pip install -r requirements-dev.txt
94+
```
95+
96+
3. **Install pre-commit hooks**:
97+
98+
```bash
99+
pre-commit install
100+
```
101+
102+
4. **Optional: Format existing code**:
103+
```bash
104+
pre-commit run --all-files
105+
```
106+
107+
The pre-commit hooks will automatically format your code using:
108+
109+
- **Ruff** for Python files (formatting and linting)
110+
- **Prettier** for JavaScript, TypeScript, JSON, YAML, and Markdown files
111+
112+
For more detailed information, see [SETUP_PRE_COMMIT.md](./SETUP_PRE_COMMIT.md).
17113

18114
## License
19115

@@ -23,4 +119,8 @@ Licensed under the Universal Permissive License (UPL), Version 1.0.
23119

24120
See [LICENSE](LICENSE) for more details.
25121

26-
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.
122+
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.
123+
124+
---
125+
126+
**Note**: This repository is actively maintained and updated with new resources, examples, and best practices for Oracle AI development.

SETUP_PRE_COMMIT.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Pre-commit Setup Guide
2+
3+
This repository uses pre-commit hooks to automatically format code on every commit.
4+
5+
## Formatters Used
6+
7+
- **Ruff**: Fast Python linter and formatter (replaces Black, isort, and flake8)
8+
- **Prettier**: Code formatter for JavaScript, TypeScript, JSON, YAML, and Markdown
9+
10+
## Initial Setup
11+
12+
1. **Install dependencies** (if not already installed):
13+
14+
```bash
15+
pip install -r requirements-dev.txt
16+
```
17+
18+
Or install individually:
19+
20+
```bash
21+
pip install pre-commit ruff
22+
```
23+
24+
2. **Install pre-commit hooks**:
25+
26+
```bash
27+
pre-commit install
28+
```
29+
30+
This will set up the git hooks to run automatically on every commit.
31+
32+
3. **Optional: Run on all files** (to format existing code):
33+
```bash
34+
pre-commit run --all-files
35+
```
36+
37+
## How It Works
38+
39+
Once installed, pre-commit will automatically:
40+
41+
- Format Python code with Ruff before each commit
42+
- Format JavaScript/TypeScript/JSON/YAML/Markdown files with Prettier
43+
- Check for trailing whitespace, end-of-file issues, and other common problems
44+
- Prevent committing if there are formatting issues
45+
46+
## Manual Usage
47+
48+
You can also run the formatters manually:
49+
50+
```bash
51+
# Run all hooks on staged files
52+
pre-commit run
53+
54+
# Run all hooks on all files
55+
pre-commit run --all-files
56+
57+
# Run a specific hook
58+
pre-commit run ruff --all-files
59+
pre-commit run prettier --all-files
60+
```
61+
62+
## Configuration Files
63+
64+
- `.pre-commit-config.yaml`: Pre-commit hooks configuration
65+
- `pyproject.toml`: Ruff configuration (Python formatting and linting)
66+
- `.prettierrc`: Prettier configuration (JavaScript/TypeScript formatting)
67+
- `.prettierignore`: Files to exclude from Prettier formatting
68+
69+
## Updating Hooks
70+
71+
To update pre-commit hooks to their latest versions:
72+
73+
```bash
74+
pre-commit autoupdate
75+
```
76+
77+
## Troubleshooting
78+
79+
If hooks fail, you can:
80+
81+
1. **Skip hooks for a specific commit** (not recommended):
82+
83+
```bash
84+
git commit --no-verify
85+
```
86+
87+
2. **Update hook versions**:
88+
89+
```bash
90+
pre-commit autoupdate
91+
```
92+
93+
3. **Clear pre-commit cache**:
94+
```bash
95+
pre-commit clean
96+
```

0 commit comments

Comments
 (0)