Skip to main content

CEF Framework

ORM for LLM Context Engineering

Just as Hibernate abstracts databases for transactions, CEF abstracts knowledge stores for Context Engineering. Build, test, and benchmark intelligent context models in minutes, without the complexity of enterprise graph infrastructure.

VersionLicenseJavaSpring Boot
// Define knowledge model like JPA entities
Node patient = new Node(null, "Patient", 
    Map.of("name", "John", "age", 45), 
    "Patient with diabetes and hypertension");

// Persist with dual persistence (graph + vector)
indexer.indexNode(patient).block();

// Query with intelligent context assembly
SearchResult result = retriever.retrieve(
    RetrievalRequest.builder()
        .query("diabetes treatment plans")
        .depth(2)  // Multi-hop reasoning
        .topK(10)
        .build()
);

Why CEF Framework?

The only Java framework that treats LLM context as first-class domain entities, with proven benchmarks showing superior performance over naive vector search.

🗄️

ORM for Knowledge Models

Define entities (nodes) and relationships (edges) like JPA @Entity. Framework manages dual persistence: graph store for relationships, vector store for semantics. Think Hibernate for LLM context engineering.

🔍

Intelligent Context Assembly

Multi-strategy retrieval: relationship navigation + semantic search + keyword fallback. Benchmarks prove 60-220% more relevant content vs vector-only approaches for queries requiring graph reasoning.

Production-Ready Patterns

Repository layer, service patterns, reactive API with Spring WebFlux + R2DBC. Pluggable backends: DuckDB, PostgreSQL, Neo4j, Qdrant. Comprehensive test suite with real medical and financial domain examples.

📦

Storage Agnostic

Pluggable graph stores (JGraphT, Neo4j) and vector stores (DuckDB, PostgreSQL, Qdrant). Start with embedded DuckDB, scale to PostgreSQL + pgvector, or use specialized databases. Configuration-driven, no code changes required.

🤖

LLM Integration

Tested with vLLM (Qwen3-Coder-30B), Ollama, OpenAI. MCP tool support for agentic workflows. Automatic embedding generation, chunking strategies, and context assembly for optimal LLM input.

💻

Developer Experience

Familiar JPA-style API: KnowledgeIndexer (like EntityManager),KnowledgeRetriever (like Repository). YAML configuration, comprehensive documentation, and 30-minute quickstart tutorial.

Proven Performance

Comprehensive benchmarks with real medical and financial data demonstrate Knowledge Model superiority over vector-only approaches.

60-220%
More Relevant Content

Knowledge Model retrieves significantly more relevant content for complex queries requiring relationship reasoning.

+19.5%
Latency Overhead

Minimal latency increase (26ms vs 21.8ms average) for dramatic improvement in context quality and relevance.