AI engineering practices.
Live data indexing, five-minute sync, scoped queries, hybrid ranking, context budgets, document and image extraction, provider routing, time budgets, schema checks, personal data tokenisation, bounded agent actions and daily validation: what runs around every model call on the AI platform we operate.
AI Platform Components
One AI service sits behind a live test-management platform, and thirteen parts around it decide whether its answers are current, scoped, affordable and safe.
Data and Retrieval
What the AI reads, how current it is, and whose data each query can see.
Live Data Indexing
An AI feature is only as useful as the records it can read, and on a working platform those records change every minute. An index built once from an export answers from last month and loads the main database every time it is rebuilt. We index 4.9 million chunks across 39 kinds of record, from issues and test cases to requirements and sprints, as 768-dimension vectors read from a database replica that runs with zero lag, so the live database never carries the AI load.
Five-minute Index Sync
When a record is edited or deleted, users expect the AI to know straight away. Without a sync the index drifts from the database, and deleted or trashed records keep turning up in answers. An incremental sync runs every five minutes across 20 tables, upserting about 8,400 changes a day with a median run of 13 seconds, and a separate deletion pass runs two minutes later in each cycle, removing about 160 records a day.
Scoped Queries
On a platform shared by many organisations, an AI answer must only ever draw on the asking team’s records. A single unscoped search leaks one customer’s issues or requirements into another customer’s answer. Every chunk carries indexed fields for team, app, record type, source table and a deleted flag, every query filters on them before ranking, and more than 79,000 teams are kept apart this way in one index.
Hybrid Ranking
Users search with exact IDs, error messages and product terms as often as with plain questions. Meaning-based search alone misses exact matches, and keyword search alone misses paraphrases, so the right record ranks below noise. Each request runs up to six queries, combines meaning-based and keyword results by reciprocal rank fusion over a depth of 40, keeps the top five per query, and drops anything scoring under 0.3 or more than 0.15 behind the best match.
A call with an engineer who runs retrieval over millions of live records, about your data, users and limits.
Context and Generation
What goes into each model call, where it comes from, and which model answers.
Context Budgets
A model can only read so much at once, and what fills that space decides the answer. Without limits, one long source such as a knowledge-base document crowds out the requirements or test cases the question was really about. Each answer gets 12,000 to 18,000 characters of context, divided by source with its own cap, from 42 percent for knowledge-base text to 18 for requirements, 15 for test cases and 4 for test data.
Document and Image Extraction
Much of what teams know sits in attached documents and screenshots rather than in database fields. If those stay unread, the AI answers without the specification or the screenshot that explains the bug. Documents of up to two million characters and twenty attachments each are extracted, images over 10 KB are turned into text with up to ten per document and eight in flight under a 90-second budget, and everything is cut into 1,800-character chunks with 200 characters of overlap.
Nightly Context Summaries
Answering well about a whole app needs a view of the app, not just the five chunks that matched a query. Building that view on every request is slow and expensive, and skipping it leaves answers blind to the bigger picture. Every night at 21:00 a job summarises up to 100,000 apps under a ten-hour cap, keeping about 7,000 summaries in the index for answers to draw on.
Provider Routing and Fallback
Model providers have outages, rate limits and price changes, and an AI feature tied to one of them inherits all three. Without routing, a provider’s bad hour becomes the platform’s bad hour, and switching means rewriting the application. Three providers sit behind one client with interchangeable drivers, local models run with a 32,768-token context, heavy jobs fall back to a hosted model when local capacity is short, and calls that hit rate limits or server errors are retried.
Time and Cost Budgets
A model call can run for minutes and cost more than the feature earns if nothing stops it. Without budgets, callers time out while the work carries on, and long prompts quietly raise the bill. Every request has a 280-second budget, each model call is capped at 90 seconds and is only started with at least 10 seconds left, retries wait no more than 30 seconds, and output is capped at 16,384 tokens.
Control and Safety
What the AI may output, what it may see, what it may do, and how we know it is healthy.
Structured Output Validation
When AI output feeds forms, test cases or actions, free text breaks the systems downstream. A missing field or malformed reply either fails silently or writes bad data into the platform. Every call that feeds the platform asks for a JSON schema, the reply is decoded and checked for required keys, a failed reply is retried once at temperature zero, and structured output never runs above a temperature of 0.2.
Personal Data Tokenisation
Prompts built from real records carry names, email addresses and phone numbers that do not need to leave the platform. Sending them to a model exposes personal data to a third party and to its logs. Before any call, email addresses and phone numbers are replaced by tokens, the token map is kept encrypted, the real values are put back only in the reply, and an action that still contains an unresolved token is not executed.
A call with an engineer about tokenising personal data, local models and keeping AI inside your limits.
Bounded Agent Actions
An agent that can change records is useful only if what it can change is limited and checked. Without limits, one bad plan updates hundreds of records or messages people who should never be contacted. Our agents plan in at most three rounds, take at most five actions per run and create at most fifty records, may only use five action types (update fields, notify, comment, create a linked record, attach a file), and each action is validated before it runs, with a review step capped at 300 seconds.
Daily Validation and Guardrails
An AI service fails quietly: a stuck sync, a lagging replica or an expiring certificate still returns answers, just worse ones. Without a daily check, nobody notices until users stop trusting the feature. A health check runs every minute, a validation at 05:10 each day runs 25 checks across the service, index, replica lag, both syncs, five scheduled jobs and logs and reviews the last 24 hours of request quality, and 20 guardrail patterns turn away prompts that probe the system’s internals.
Self-assessment Questions
Questions worth asking of any platform you run today.
- Could one customer’s records appear in another customer’s AI answer?
- When a record is deleted, how long until your AI stops quoting it?
- Does your AI index read from your live database or from a replica?
- What stops one long document crowding out everything else in a prompt?
- What stops a single request from running for minutes or costing more than planned?
- Could you switch model providers without changing application code?
- Do email addresses and phone numbers leave your platform inside prompts?
- What can your AI change or send without its actions being checked?
An engineer reviews your data, retrieval, model choice, checks, budgets and guardrails against the questions above, and gives you a prioritised plan.