a v a Objects a nd Rel a tion a l D a t a b a ses J a v a Runtime with f a st st a rtup, live relo a d, a nd a rich extension ecosystem. The emerging fr a mework for LLM integr a tion in J a v a - uni f ied API for AI model orchestr a tion. 6
s a bridge between your m a pped dom a in model a nd LLMs. 1. Met a model Structure Describes your entity model, i.e. your entities, their a ttributes, a nd the a ssoci a tions between them in a textu a l form a t consum a ble by LLMs. 2. Query Results Seri a liz a tion Tr a nsforms complex ORM query results: objects, collections, embedd a bles, a ssoci a tions for AI a gents to consume. 11
ined Access: LLMs c a n only a ccess m a pped entities a nd their f ields - no a rbitr a ry t a ble a ccess, a nd c a n be restricted to re a d-only queries • F a il-E a rly V a lid a tion: Inv a lid HQL is c a ught before it re a ches the d a t a b a se • Self-Correction: Hibern a te's cle a r error mess a ges c a n be fed b a ck to the LLM to f ix mist a kes, a gentic p a tterns will produce better results over time • Port a bility: One query l a ngu a ge (HQL) works a cross a ll supported d a t a b a ses • H a ndling Complexity: HQL is closer to our l a ngu a ge — a ssoci a tions, embedd a bles, inherit a nce a re simpler, a nd complex query logic becomes n a tur a l p a th expressions 14
a l inform a tion from your d a t a b a se • Retrieve relev a nt d a t a f irst, then let the LLM re a son a bout it • The LLM c a n now provide informed, contextu a l a nswers grounded in your a ctu a l d a t a 15
rd for connecting AI models with tools a nd d a t a providers • Single API integr a tion, a cts like a univers a l a d a pter for AI a gents • Your Hibern a te Assist a nt becomes a fund a ment a l d a t a tool th a t a ny a gent c a n discover a nd use 19
your dom a in: the Assist a nt module simply exposes th a t knowledge to LLMs 2. HQL over SQL: type s a fety, constr a ined a ccess, f a il-e a rly v a lid a tion, better port a bility 3. Adv a nced queries m a de simple: a nyone c a n use Hibern a te through n a tur a l l a ngu a ge 4. RAG with re a l d a t a : ground LLM responses in your a ctu a l d a t a b a se 5. MCP m a kes it extensible: expose your d a t a to a ny AI a gent in the ecosystem 6. Minim a l code: a few cl a sses, a few a nnot a tions, a nd your d a t a spe a ks n a tur a l l a ngu a ge 22
a ssist a nt module - a v a il a ble since ORM 7.3+ • Qu a rkus L a ngCh a in4j integr a tion: qu a rkus-l a ngch a in4j-* • Any supported LLM provider (Oll a m a , OpenAI, Anthropic, Google, …) • Option a ls • Qu a rkus MCP servers: qu a rkus-mcp-server-* • Qu a rkiverse Ch a ppie extension: qu a rkus-ch a ppie 23
te.org/orm/ • Qu a rkus: https://qu a rkus.io/ • L a ngCh a in4j: https://github.com/l a ngch a in4j/l a ngch a in4j • Demo source code: https://github.com/mbell a de/demos Demos 24