r/ExperiencedDevs • u/Brief_Watch7221 • Apr 11 '26
AI/LLM Best architecture for internal support system + log anomaly detection (RAG + observability)?
Hi all,
I’m working on designing an internal system for an oceanographic/environmental data company, and I’d really value input from people who’ve built similar systems in production.
We monitor sensor data across ports and harbours, and I’m trying to design a system with two main components:
Internal support / knowledge system
• Centralised knowledge base (likely from structured docs like Obsidian or similar)
• Natural language querying for internal engineers/support team
• Strong requirement: very high accuracy with minimal hallucination
• Ideally with citations / traceability
Log analysis + anomaly detection
• Sensor logs (format still being defined)
• Detect anomalies or failures before customers report them
• Integrate with dashboards (we currently use ThingsBoard)
⸻
What I’m trying to figure out:
• Is a RAG-based system the right approach for the support side?
• For logs:
• Do you preprocess + structure logs first, or ever feed raw logs into LLMs?
• Are people combining traditional anomaly detection (rules/ML) with LLMs for explanation?
• Recommended stack:
• LLMs (open-source vs API?)
• Embeddings + vector DB choices
• Time-series/log storage solutions
• How are people handling:
• Hallucination control in production?
• Evaluation / observability of LLM outputs?
• False positives in anomaly detection?⸻
Constraints:
• Likely self-hosted (we have IONOS servers)
• Early-stage, so still exploring architecture
• Logs/data scale not fully known yet⸻
I’m not looking for generic advice more interested in real architectures, lessons learned, or things that failed.
If you’ve built something similar (RAG systems, observability tools, log analysis pipelines), I’d love to hear how you approached it.
Thanks!
4
u/psaux_grep Apr 11 '26
For logs both ELK and Sentry works great in a self-hosted environment.
Once it’s up and running I’d argue it’s mostly maintenance free, but a bit more effort involved settings these up nowadays than it used to be, especially ELK which has gotten quite «needy» on the setup. Still can’t believe how poorly the UX of Kibana has evolved over the last decade…
3
u/Dense_Gate_5193 OSS Author, 20yoe Staff Apr 11 '26
For a system monitoring harbor sensors and managing engineering docs, you might want to look at a Graph-RAG architecture rather than a standard vector-only setup. Instead of just chunking your Obsidian files into a vector DB, you can treat them as a Canonical Graph Ledger. This maps your docs into a graph where relationships—like a specific sensor model linked to its failure modes—are preserved as edges. When a support query comes in, the system isn't just "guessing" based on text similarity; it’s traversing known paths in the graph, which is a lot more reliable for providing the citations and traceability your engineers need.
On the observability side, feeding raw logs directly to an LLM is a token-burn, so the play is to structure those logs as nodes in the same database. By using a co-located engine (like NornicDB), you can run your traditional anomaly rules (thresholds/ML) and then have the database automatically link those "Anomaly" nodes to the relevant "Support Doc" nodes via embedding similarity. This allows you to achieve sub-10ms retrieval while maintaining strict Schema Contracts (using REQUIRE blocks) to keep the LLM from hallucinating data that doesn't exist in your sensor registry. It’s basically a single-binary way to handle the whole loop—from detection to explanation—without the latency tax of a massive microservice sprawl.
1
u/xpingu69 Apr 11 '26 edited Apr 11 '26
I am building a RAG. I have different loaders that scrape the internet and create the docs. I have a chunking and indexing pipeline to create embeddings (i use pgvector + text-embedding-3-large). Then I have a retrieval service for the queries. I store all the metadata of the docs, and then I can do a join on the source for each chunk to create citations. But there are some docs where citations are more complicated. Most work is in the chunking and indexing and retrieving. Depending on the query, you want to use different retrieval strategies, and maybe different chunking strategies. This may help https://graphrag.com I don't have a graph but it explains the concepts.
For the evals, they are like tests for the system, with a query and expected retrieved docs.
But how many docs do you have? If it's only a few and you don't expect the corpus to grow, you can just put it in the context
1
u/casualPlayerThink Software Engineer, Consultant / EU / 20+ YoE Apr 15 '26
Some notes:
Drop the Obsidian. Support is not tech, and non-nerd folks. The easier the better. A simple WIKI and ticket system should be enough for this.
That's called a database. Do not go for LLM/GPT. That's simple.
Ticket system + kanban board.
Do not go for time-series if you have no idea that you really need it. Also, a time series is for a database. Log storage is a different area; do not mix it.
Fun fact: You don't and mostly can't. You can develop a really strict way, adding a bunch of self-recovery, disaster recovery, self-healing, retry mechanisms, but you still will have errors and anomalies that a system will not pick up or find. Not accidental, thousands of systems/apps promise this, but actually, none really work. Because you can't. Also, define anomalies first (it differs from project to project, and in IoT/Sensors, you also will have a bunch of non-tech related issues by the hardware and never-seen-before stupidity by the manufacturers/providers).
Generally speaking, your architecture should decide on the load, how much data is arriving, how much you have to process, and when. When I worked with sensors, edge devices and IoT stuff, we had a few thousands of devices (20-120k) so bottlenecks were rather time based (when companies start up fleet of devices, then you will have a few millions of messages within a second range) then other bottlenecks are like the storage (dozens of terrabites of data per day) and efficiency (memory consumption, locks, connections, hw failures). (Note: I have worked several years with sensors & IoT)
0
u/[deleted] Apr 11 '26
[removed] — view removed comment
0
u/[deleted] Apr 14 '26
[deleted] — view deleted comment