What an AI Engineer Actually Does All Day: 5 Workflows Behind the Prompts
It is 10:15 on a Tuesday morning. I am staring at a split terminal comparing two raw JSON payloads. One contains an unescaped carriage return that crashed our document parsing worker. The other contains a live telephony transcript where a caller repeated “hello, can you hear me” three times before our audio streaming pipeline hung up on them.
I have not written a single prompt today.
If you read social media or job board hype, you might believe an AI engineer spends their week crafting clever system instructions and adjusting temperature values. The popular perception is simple: write fifty words of English, send it to a frontier model, and ship the result. The reality is far closer to systems plumbing, data archaeology, latency profiling, and regression testing. The prompt is simply the visible piece of a large, complex machine.
The Myth of the Prompt
The idea that prompt writing defines AI engineering comes from prototypes. In an experimental web console, entering a clever instruction produces an articulate answer in seconds. When testing alone, the model always appears capable. You supply clean sentences, overlook latency, and forgive occasional errors because you already know what the system meant to say.
Prompting is the visible ten percent of the work—the conversational tip of an iceberg resting on standard software engineering.
The remaining ninety percent exists because foundation models are non-deterministic, stateless, and expensive microservices. They possess no built-in knowledge of your database, no schema compliance guarantee, and no awareness of when they are wrong. They fail silently, invent facts, choke on malformed inputs, and exhaust budgets if fed bloated context histories.
To turn a raw model endpoint into a reliable product, you must wrap probabilistic outputs in deterministic software: validation layers, caching systems, message brokers, streaming sockets, and evaluation suites. That work divides into five core areas that fill an actual engineering week.
1. Data Cleanup and Retrieval Prep
What the Work Looks Like Day to Day
My morning typically starts in data ingestion scripts. I inspect raw knowledge bases, product catalogs, support tickets, and technical manuals. Tasks include stripping boilerplate headers, extracting tables from complex PDFs, deduplicating repetitive policy updates, fixing encoding artifacts, and chunking text semantically for retrieval. I also maintain scheduled sync jobs so stale embeddings are pruned before they mislead users.
Why It Takes Time
Models cannot reason over text they cannot parse. If an extraction pipeline turns a multi-column manual into interleaved text, semantic search retrieves noise. RAG depends heavily on chunking: chunks that are too long dilute facts across broad vectors, while chunks that are too short sever facts from critical context. Finding reliable chunking boundaries and metadata schemas requires continuous auditing.
Tools and Techniques People Commonly Use
- Parsing engines such as PyMuPDF, Unstructured, and BeautifulSoup for HTML stripping.
- Recursive character splitting and markdown-aware boundary chunkers.
- Dense embeddings paired with BM25 lexical search for hybrid retrieval in PostgreSQL using pgvector.
- Background task queues like Celery to process document updates and re-index embeddings asynchronously.
From My Own Work
When building a voice agent for equipment maintenance, our team started with fifty PDF manuals. Default parsing mangled troubleshooting tables into scrambled text, causing the bot to suggest replacing the wrong components because part numbers detached from symptoms during naive chunking. I spent three days building custom table extractors, stripping boilerplate footers, and tagging chunks with parent section headers and hardware models before loading them into pgvector. Retrieval accuracy improved immediately without changing the system prompt.
2. Evals and Regression Testing
What the Work Looks Like Day to Day
When tweaking a prompt to sound friendlier, how do you verify it still formats database queries correctly? AI engineers answer this by building automated evaluation suites. The work includes curating golden datasets of real user questions, defining explicit scoring rubrics, and running automated regression suites on every prompt or model update to catch regressions early.
Why It Takes Time
Traditional software tests are deterministic: input 2 and 2 outputs 4 or fails. AI outputs are probabilistic text. Two different answers can both be valid, while a fluent response can conceal subtle factual errors. Human review does not scale, so we build LLM-as-a-judge pipelines. This requires calibrated rubrics, mitigating judge bias, and validating alignment with human spot-checks before gating CI deployments.
Tools and Techniques People Commonly Use
- Version-controlled golden test sets stored in JSONL or YAML.
- Automated evaluation frameworks like Ragas, DeepEval, or custom Python test runners.
- LLM-as-a-judge pipelines with chain-of-thought grading criteria for factual consistency and tool argument compliance.
- Continuous integration workflows that block deployment if semantic accuracy scores drop below defined thresholds.
From My Own Work
For an inbound scheduling voice bot, the agent occasionally booked appointments in the caller’s past when users referenced relative dates like “next Monday” on Sunday evening. We assembled a golden set of sixty challenging transcripts covering timezone shifts, ambiguous date phrasing, and mid-sentence cancellations. Before deploying prompt or model changes, an automated Python runner tests every scenario against ground truth. Establishing robust evals are the unit tests of AI that prevent silent degradation in production.
3. Latency, Cost, and Model Routing
What the Work Looks Like Day to Day
AI engineering means measuring milliseconds and micro-dollars. Daily tasks include inspecting trace waterfalls, configuring token streaming, setting up caches, and trimming prompt context. I audit token consumption regularly, testing whether accumulated instructions can be condensed, moved into few-shot retrieval, or offloaded to smaller models.
Why It Takes Time
Frontier models are slow and costly. In voice AI, latency between caller speech and audio playback must remain under 800 milliseconds. A two-second delay breaks conversational rhythm and causes users to talk over the assistant. Re-sending full message histories on every turn also multiplies costs. Keeping latency acceptable requires concurrent workflows: streaming tokens directly to audio synthesizers, initiating retrieval early, and caching frequent queries.
Tools and Techniques People Commonly Use
- Token streaming over Server-Sent Events (SSE) and WebSockets.
- Exact-match and semantic caching in Redis to serve frequent queries instantly.
- Model tiering: routing simple classification and extraction tasks to compact models like GPT-4o-mini or Claude Haiku while reserving frontier models for multi-step reasoning.
- Prompt token counters like tiktoken and distributed tracing dashboards like Langfuse or OpenTelemetry.
From My Own Work
While building an interactive voice assistant over SIP telephony and WebSockets, our prototype suffered from a two-second response delay, causing callers to think the line dropped. Prompt tweaks could not fix a pipeline problem. We re-engineered the backend to stream LLM tokens into audio synthesis at the first sentence boundary. We also routed basic confirmations to a lightweight model returning in under eighty milliseconds, dropping response latency to 650 milliseconds and halving API costs.
4. Guardrails and Runtime Debugging
What the Work Looks Like Day to Day
When an LLM connects to tools, databases, and APIs, reliability depends on strict boundaries. Daily work involves validating outputs against data schemas, enforcing tool execution permissions, and debugging non-deterministic errors by tracing execution graphs: prompt versions, retrieved chunks, and tool parameters for that specific session.
Why It Takes Time
Foundation models suffer from hallucinations, formatting drift, and injection attempts. A model emitting valid JSON for hundreds of calls can suddenly output broken syntax or invent parameters. Without guardrails, agents can enter recursive loops, execute destructive API calls, or leak context. Reproducing bugs is difficult because identical inputs can produce different tokens, requiring deep telemetry over simple local stepping.
Tools and Techniques People Commonly Use
- Schema enforcement libraries like Pydantic to validate tool arguments and JSON payloads before code executes.
- Hard timeouts, retry backoffs, and circuit breakers implemented via Celery and Redis.
- Scoped API tokens and execution sandboxes that prevent agents from performing unauthenticated state changes.
- Distributed tracing frameworks that record exact prompt inputs, retrieved context, token usage, and tool arguments per trace.
From My Own Work
In a customer support agent with order lookup tools, a user pasted an email thread containing an automated signature. The agent attempted to query customer records using the signature’s contact number rather than the verified account ID. Because we enforced strict Pydantic schemas and argument whitelisting at the boundary, our middleware intercepted and rejected the call before database execution. We tightened the tool logic so account IDs are injected directly from authenticated session tokens rather than parsed conversational text. For more failure modes, read my guide on 5 things that break when an AI demo goes to production.
5. Talking to Users and Reviewing Transcripts
What the Work Looks Like Day to Day
A major part of my week involves reading raw transcripts. I inspect sessions where callers hung up, gave negative feedback, or triggered fallbacks. I also talk directly to users and support teams to identify where instructions were ambiguous and which capabilities need priority.
Why It Takes Time
Users do not interact with software the way developers predict. They make typos, change their minds mid-sentence, use regional slang, and combine three intents in one message. You cannot discover these realities from hypothetical prompts; roadmap decisions must stem from observed production distributions, separating prompt confusion from UX friction.
Tools and Techniques People Commonly Use
- Session playback tools and structured transcript exploration dashboards.
- Qualitative tagging systems to categorize conversation outcomes (successful completion, user abandonment, tool failure).
- In-app feedback mechanisms like thumbs up and thumbs down ratings with optional user comments.
- Periodic discovery calls with active users to observe how they interact with the interface in real time.
From My Own Work
Reviewing logs for an appointment confirmation bot revealed dozens of callers answering with phrases like “sounds good” or “fair enough.” Our classifier had been tuned for formal phrases like “yes, please confirm,” so the bot repeatedly prompted callers to clarify, causing hang-ups. Reading real transcripts made the issue obvious within fifteen minutes. We extracted thirty authentic phrases into our evaluation suite and updated the classifier, immediately resolving confirmation friction.
The Task That Takes More Time Than People Expect: Data Cleanup
If you ask an aspiring engineer what will occupy most of their time, they will likely answer model evaluation or complex agent orchestration. But if you ask anyone shipping production systems, the answer is almost always data cleanup.
Data cleanup consumes the most time because real-world documentation is inconsistent and dynamic. Human writing rarely follows clean schemas.
In an enterprise corpus, you encounter product manuals, Notion pages, and scanned policy updates accumulated over years:
- Outdated 2023 refund rules contradict 2025 revisions in the same repository.
- Multi-column tables confuse standard markdown extractors.
- Redundant FAQ entries crowd out specific technical specifications during retrieval.
- PDFs contain unprintable control characters and unindexed scanned pages.
When an AI system answers incorrectly, developers often blame the model and tweak prompts. Nine times out of ten, the failure stems from retrieval surfacing incomplete or contradictory text.
In one project, our team spent two days debugging an agent hallucinating industrial warranty terms. We tested prompt variations, adjusted temperatures, and added few-shot examples. Nothing worked.
When we audited the vector store, we found an automated ingestion script had indexed an archived 2021 warranty alongside the active 2025 version. Both chunks had high similarity scores, so the retriever fed both contradictory statements into the context window. The model was not hallucinating; it was trying to reconcile conflicting data supplied by our backend.
The fix required zero prompt engineering: we built an ingestion pipeline that validated document active dates, tagged metadata, and purged superseded vectors upon update. Clean, structured data resolved the hallucination instantly.
Practical Skills to Build If You Want to Be an AI Engineer
If you want to transition into AI engineering, you do not need a machine learning PhD. You need strong software engineering fundamentals paired with a clear understanding of LLM characteristics:
- Backend Architecture and Async Python: Master asynchronous Python in FastAPI, manage background queues with Celery or Redis, handle connection pooling, and stream data over WebSockets and SSE.
- Data Ingestion and Vector Databases: Learn to extract, clean, and chunk unstructured text from real-world documents. Understand dense embeddings, vector search in PostgreSQL with pgvector, and hybrid lexical search.
- Evaluation Methodologies: Learn to build reproducible test suites. Curate golden datasets of edge cases, write clear scoring rubrics for LLM judges, and automate evaluation in CI pipelines.
- Observability and Tracing: Use tools like OpenTelemetry and Langfuse to trace requests across agent loops, profile latency bottlenecks, and monitor token costs per session.
- Defensive Architecture: Treat LLM outputs as untrusted input. Enforce strict Pydantic schemas, restrict tool permissions, and design circuit breakers. Knowing when a workflow requires a bounded state machine versus an autonomous loop differentiates a deterministic chatbot vs. agent system.
- Transcript Analysis: Build the discipline of reading raw conversation logs regularly to discover real failure modes, user friction, and unhandled edge cases.
Conclusion
Writing a prompt is how you explore what a language model can do. Building reliable software around that model is what an AI engineer does all day.
The prompt is the visible, glamorous part of the discipline. But the actual reliability of any AI system is determined by the unglamorous engineering surrounding it: clean data pipelines, comprehensive evaluation suites, strict latency budgets, defensive guardrails, and systematic review of real user interactions.
If you treat foundation models as magic oracles, you will struggle to get prototypes past staging. If you treat them as non-deterministic microservices that require rigorous software engineering, you can build products that serve users dependably every day.
Which part takes the most time for you?
Whether you are managing data ingestion headaches, wrestling with evaluation rubrics, or optimizing token latency, I would like to hear what challenges you are navigating. Leave a comment below or send me an email to share your experience.
Written by Muhammad Faizan Nadeem
Email: imfaizannadeem2@gmail.com
Website: https://faaizan.space

