Repository navigation
Major change: Turn OgbujiPT into a general purpose LLMOps knowledge bank system #92
Replies: 7 comments
|
OK the initial, and probably heftiest phase of this change is ready. See: #93 Super excited for this new direction, and eager to see what folks see of the new e.g. hybrid search features. For a quick intro to the new changes, a good start is the |
|
Interesting and possibly cautionary discussion, "Universal LLM Memory Doesn't Exist", though I think in my vision a lot of these issues are considered. Here's a summary of the post and discussion:
I think this bolsters my thinking of OgbujiPT’s direction more as towards a “knowledge bank”. The things that seem to trouble OP feel like naive strategies, and I think that with proper architecture we can be far more sophisticated. The core focus is more on semantic/long-term knowledge rather than pretending to be a universal, always-on memory layer. Strategically we should maintain a clear separation between message history, memoization, and other stores, More tactically our support for multiple backends (pgvector, qdrant, hybrid search, eventually graph-based Onya, etc.), should provide ways around the sorts of concerns expressed by OP. We're already pushing away from the one-size-fits-all “universal memory” pattern they are arguing against. The design space OP sketches out—distinct working vs. semantic memory, careful attention to latency and N+1 issues, and explicit routing/aggregation across different stores—is very much aligned with what OgbujiPT is trying to formalize, so it feels more like a useful validation of the current direction than a contradiction. I'll also note my opinion, though, that the benchmark result “vector/graph memory worse than long context” is highly setup-dependent: model emphasis and quality, prompt engineering, retrieval quality, and task structure all strongly affect whether long-context or RAG wins. I take this more as a cautionary stroke than a universal rule. It is useful food for thought for OgbujiPT. I'm thinking we should explicitly express and design a memory/library taxonomy, e.g., explicit conversational memory / scratchpad / working memory / semantic memory / observability logs, with each configurable for specific storage and retrieval strategies, so users are nudged away from universal patterns by the API itself. The N+1 issue suggests we should provide first-class support for batching and pipelining retrieval operations, as well as cheap lexical filters (BM25, regex, Postgres FTS) that can run close to the data and reduce how often embeddings or graph traversals are needed. Since local users care a lot about latency and resource contention, OgbujiPT may want “profiles” or presets (e.g., “low-latency local,” “accuracy-first server-side”) that tune how aggressively it uses LLM-powered enrichment, summarization, or graph curation in the background. |
|
I ended up with a small detour to tame OgbujiPT’s test suite, which ended up to be far less of a detour than expected, as I ended up developing an in-memory version of the e.g. DataDB interfaces which could stand in as a less brittle alternative to mocking, but also provides a real, usable implementation that happens to be perfect for testing, prototyping, and lightweight production use cases. Fast, more reliable test—without the fragility of mocking third-party APIs—and as a bonus, a valuable in-memory feature for end users. |
|
Step 1 released. Woohoo! https://pypi.org/project/OgbujiPT/ |
|
New branch
Includes tests and a demo: |
|
Thoughts on OpenClaw, a Node.js/TypeScript personal AI assistant that went viral to start 2026 (100k+ GitHub stars within one week in January). It's built around a WebSocket gateway that connects to multiple messaging platforms. While it operates in a different space from OgbujiPT, several of its design patterns are relevant to our knowledge bank initiative, and more importantly, the hype has inspired me to find a bit of time to continue on this journey.
A few things we might want to add to our v0.11.0 plans:
We can use existing: Rasa as a Python multi-channel gateway ("Rasa is the leading open-source conversational AI platform that enables both individual developers and large enterprises to build superior AI assistants and chatbots.") We can also integrate with LlamaIndex or Haystack towards a complete RAG framework Strategic Positioning could be OgbujiPT as the knowledge bank layer that powers other tools. "PostgreSQL for knowledge". Interesting note: Digital Ocean has a post on how to run OpenClaw ("for $7 per month). This also had me thinking of where we fit into the big picture of AI agent/chat tools, including RAG frameworks. How do we find unique complementary areas without too much wheel-reinvention? How about this? graph TB
subgraph layer1["RAG Applications (User Code)"]
direction TB
app1["Question answering"]
app2["Document chat"]
app3["Agents"]
end
subgraph layer2["RAG Frameworks (Optional)"]
direction TB
fw1["LlamaIndex: query engines, response synthesis, agents"]
fw2["Haystack: pipelines, readers"]
end
subgraph layer3["Knowledge Bank Layer ← <b>OgbujiPT is here</b>"]
direction TB
ogb1["Multi-backend management"]
ogb2["Query routing & orchestration"]
ogb3["Observability & maintenance"]
ogb4["Protocol-based extensibility"]
end
subgraph layer4["Storage Backends"]
direction TB
store1["PostgreSQL + pgvector"]
store2["Qdrant"]
store3["Onya (knowledge graphs)"]
end
layer1 -->|uses| layer2
layer2 -->|uses| layer3
layer3 -->|uses| layer4
Decision ladder: "Should feature X be in OgbujiPT core?"
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
OgbujiPT started out as a set of useful conventions for LLM prompting and API invocation (mostly OpenAI API style). We added RAG features, and really this has been the primary usage, at least by the project leaders.
I think it's time to lean into this and turn OgbujiPT into a general purpose LLMOps knowledge bank library (AKA a memory system). We still have a lot of opinionated preferences for managing LLM memory and context, and this package would become a convenient API for these. There are other memory systems out there, but again, most of them go against my opinions, and frankly I'm more comfortable maintaining my own, especially since over the years of OgbujiPT, so much of the work has already been done. All that's really left is to clean up cruft and clarify purpose before adding some useful new features.
OgbujiPT already supports:
Some of the things to add would be:
Note: I'm happy with offloading some responsibilities, e.g. using Chonkie for doc/text preparation rather than rolling our own.
Note: I STILL detest massive, over-frameworks such as LangChain, and I want to find ways to avoid being anything the like, and keep it maximally Pythonic, in the old-school sense. In a few specific terms:
To consider: evaluation. This is essential to the use of such knowledge base systems, but perhaps not a wheel we want to reinvent. Can we find a way so work with other eval tools without adding too much complexity? Retrieval quality metrics (recall@k, MRR, NDCG)? End-to-end LLM response quality grading? Latency/cost budgeting? A/B testing infrastructure? Ongoing drift detection (yes, where evals meet observability)?
My thinking is that the version bump to 0.10.0 will be the main marker of this change. We'll work it over the next few months, 0.11.0 and more, if need be, until we're happy with it, and can finally notch up 1.0.0.
Other projects to be aware of
Cloud & not self-hostable, so not really "competitors"
Some interesting reading
some broad ideas for demos
All reactions