Skip to main content

RAG on AWS Bedrock vs Oracle Cloud: Architecture, Trade-offs, and When to Choose Each

By Venkata Sreeram Murthy Gonella · · 5 min read
Istock 691171106 (1) (1)

Series: Enterprise GenAI & RAG Architecture — Part 4 of 5 

Two Very Different Approaches to Enterprise RAG

In Part 3, we covered Azure — the natural choice for Microsoft-heavy enterprises. Today we explore two more platforms: AWS Bedrock and Oracle Cloud Infrastructure (OCI). Each has a distinct architectural philosophy and a clear ‘best fit’ use case.

AWS Bedrock: Maximum flexibility. The broadest model catalog in the industry. Built for teams that want to experiment with multiple LLMs and use managed services to minimize operational overhead.

OCI Vector Search: Maximum efficiency for Oracle customers. Native vector support directly in Oracle Database 23ai — no separate vector database needed. SQL-native vector queries from day one.

Choosing a cloud for RAG is not about which is ‘best’. It is about which fits your existing infrastructure, team skills, and cost model.

AWS Implementation — Amazon Bedrock + OpenSearch

AWS Services

Requirement AWS Service Notes
LLM Amazon Bedrock Claude 3.5 Sonnet, Llama 3, Mistral, Titan — one API
Embeddings Amazon Titan Embeddings V2 1024-dim vectors, native Bedrock integration
Vector Store Amazon OpenSearch Service k-NN plugin with HNSW algorithm
Storage Amazon S3 Source documents, ingestion staging
Compute AWS Lambda (Python) Serverless, event-driven, auto-scaling
Orchestration AWS Step Functions Visual workflow: Extract → Chunk → Embed → Store
CI/CD AWS CodePipeline + CodeBuild Source → Build → Test → Deploy
Monitoring Amazon CloudWatch Logs, metrics, alarms, dashboards
Secrets AWS Secrets Manager + IAM Roles IAM-native, no credential management needed

AWS Architecture Flow

  • Documents in S3 trigger a Lambda function via S3 Event Notification
  • AWS Step Functions orchestrates the pipeline: Extract → Chunk → Embed → Store
  • Chunking Lambda uses LangChain RecursiveCharacterTextSplitter (512 tokens, 50-token overlap)
  • Amazon Bedrock Titan Embeddings V2 generates a 1024-dim vector per chunk
  • OpenSearch k-NN index stores chunk text + vector + metadata using HNSW algorithm
  • RAG app (Lambda + API Gateway): embed query → OpenSearch k-NN → build prompt → call Bedrock Claude → return answer
  • CloudWatch captures all logs, latency metrics, and fires alerts on anomalies

AWS Bedrock — The Multi-Model Advantage

The biggest differentiator of AWS Bedrock is its model catalog. No other platform offers this breadth through a single unified API:

Model Family Provider Best For
Claude 3.5 Sonnet / Haiku Anthropic Complex reasoning, long documents, coding
Llama 3.1 / 3.2 Meta (open source) Cost-sensitive deployments, fine-tuning
Mistral Large / Small Mistral AI European data residency requirements
Amazon Titan Text AWS AWS-native, predictable pricing
Cohere Command Cohere Enterprise search, RAG-optimised

Bedrock lets you A/B test different LLMs with zero infrastructure changes. Switch Claude to Llama by changing one line — the API contract stays identical.

Bedrock Knowledge Bases — Managed RAG

For teams that want to move fast, AWS Bedrock Knowledge Bases is the fastest path to production RAG:

  • Point it at an S3 bucket — AWS handles chunking, embedding, and OpenSearch automatically
  • No infrastructure to manage — fully serverless, auto-scaling
  • Integrated with all Bedrock LLMs — one API call returns a grounded answer with citations
  • Trade-off: less control over chunking strategy, embedding model, and retrieval tuning

Use the managed option for prototypes and internal tools. Use the custom Lambda + OpenSearch path for production systems where retrieval quality tuning is critical.

AWS CodePipeline Testing

Stage What Runs Tools
Source Fetch from Code Commit or GitHub on push Git
Build Install: pytest, ragas, deepeval, promptfoo, langsmith CodeBuild
Unit Tests Extractor functions, chunking logic, prompt templates PyTest
RAGAS Evaluation Precision ≥ 0.80, Faithfulness ≥ 0.85, Relevance ≥ 0.80 RAGAS
Bedrock Evaluation Jobs AWS-native: accuracy, robustness, toxicity scoring AWS Bedrock
LangSmith Tracing Full chain trace, latency profile, error surfacing LangSmith
Prompt Regression Golden Q&A dataset, compare to baseline PromptFoo
Deploy Canary: 10% traffic → monitor → full promotion Lambda / ECS

OCI Implementation — Oracle Database 23ai as Your Vector DB

Oracle Cloud Infrastructure takes a fundamentally different approach. Instead of adding a new vector database service alongside your existing infrastructure, OCI embeds vector capabilities directly into Oracle Database 23ai.

If your enterprise already runs Oracle ERP, Oracle databases, or Oracle Fusion middleware — you already have a production-grade vector database. You just need to enable it.

OCI Services

Requirement OCI Service Notes
LLM OCI Generative AI Service Cohere Command R+, Llama 3 — hosted in OCI regions
Embeddings OCI Embed Models (Cohere) embed-english-v3.0, 1024 dimensions
Vector Database Oracle DB 23ai — VECTOR data type SQL-native — no separate service needed
Storage OCI Object Storage Source documents, ingestion staging
Compute OCI Functions (Python) Serverless, triggered by Object Storage events
CI/CD OCI DevOps Pipelines Code repos, build runners, deployment pipelines
Monitoring OCI Logging & Monitoring Structured logs, metrics, anomaly detection
Secrets OCI Vault Keys, tokens, connection strings

OCI Architecture Flow

  • Documents uploaded to OCI Object Storage trigger an OCI Function via OCI Events Service
  • Function extracts text and sends to chunking logic (Python-based splitter)
  • OCI Generative AI Embed Models generate 1024-dim vector per chunk
  • Chunk text + vector stored directly in Oracle DB 23ai using the native VECTOR column type
  • RAG app: embed query → SQL VECTOR_DISTANCE() search → build prompt → call OCI GenAI → return answer

OCI’s Killer Feature — SQL-Native Vector Search

This is what makes OCI genuinely unique. Vector search in Oracle DB 23ai is just a SQL query:

SELECT chunk_text,

       VECTOR_DISTANCE(embedding, :query_vector, COSINE) AS similarity_score

FROM   documents_chunks

WHERE  category = 'HR'

ORDER  BY similarity_score

FETCH  FIRST 5 ROWS ONLY;

Notice the WHERE clause — you can combine traditional SQL filters with vector similarity in a single query. This enables hybrid filtering that other vector databases require complex workarounds to achieve.

OCI Advantage Business Impact
No separate vector DB service Eliminates one entire service to provision, scale, and secure
SQL-native vector queries Existing Oracle DBAs can manage and query the vector store immediately
Row-level security Oracle’s mature security model applies to vector data automatically
Existing Oracle licenses Vector search at no additional service cost for current Oracle customers
Unified monitoring Vector DB metrics alongside all other database metrics in one place

AWS vs OCI — Side-by-Side Comparison

Factor AWS Bedrock OCI Vector Search
LLM Choice Broadest catalog: Claude, Llama, Mistral, Titan, Cohere Cohere Command, Llama 3
Vector DB Amazon OpenSearch — dedicated service Oracle DB 23ai — built into existing DB
Setup Speed Bedrock Knowledge Bases = minutes for MVP Moderate — requires Oracle DB 23ai setup
Operational Cost OpenSearch cluster + Lambda costs Included in Oracle DB license for existing customers
Query Language OpenSearch DSL / Python SDK Standard SQL with VECTOR_DISTANCE()
Best For Multi-model experiments, greenfield projects Oracle shops, ERP integration, existing Oracle DBAs
Managed RAG Yes — Bedrock Knowledge Bases Not fully managed yet

➡  In Part 5 — the final post — we cover the full testing strategy for RAG systems: the 4-layer testing pyramid, RAGAS metrics, hallucination detection, and the complete GenAI CI/CD pipeline.

Venkatasreerammurthy Headshot

Venkata Sreeram Murthy Gonella

Venkata Sreeram is a Lead Technical Consultant at Perficient.