ViewOps User Memory Architecture
ViewOps uses a hybrid memory model to track and personalise user interactions across SQL-based queries. The goal is to make answers more relevant, secure, and consistent — without relying solely on the language model.
Structured Memory (PostgreSQL)
Core user data is stored relationally to support:
- Access Control — what data each user can see (e.g. hide financials for Livestock team)
- Prompt History — what they asked, how it was answered, and what tools were used
- Tag Context — links each user to departments, topics, metrics, and ownership
- Feedback Loops — records if the answer was correct or corrected by the user
- Edit Tracking — captures how often users adjust AI output or trigger manual overrides
Semantic Memory (Vector DB – e.g. pgvector)
Vector embeddings are used to semantically match:
- New questions to previous ones
- Fields/metrics to user context
- Prompts to appropriate predefined tools
This allows the system to auto-suggest tools, detect ambiguity, or route queries with higher confidence.
Example Use Cases
- “What about Abattoir 2?” → understood from previous batch query as a supplier site
- User who always checks Yield Variance → answer formatted as table + chart