▸case-19 We are adding an automated circuit breaker wrapper around our external LLM service provider to prevent service starvation during API outages. What state transitions and configuration metrics should the wrapper monitor? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-23 We are setting up authentication for our Node.js API server before adding AI endpoints. Write an Express middleware function that extracts a JWT bearer token from the HTTP Authorization header and verifies it using `jsonwebtoken.verify()` with a public key. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-20 We need our LLM to return structured JSON containing ticket category, numerical priority, and summary fields for downstream program consumption. Which API parameter configuration forces structured JSON mode on the provider request? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-21 We are configuring PostgreSQL with pgvector for our document storage layer. We need to create an HNSW index on our document embeddings table `doc_vectors` using cosine distance. What exact SQL `CREATE INDEX` command syntax specifies `m=16` and `ef_construction=64` for `vector_cosine_ops`? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-16 During code review of an AI feature pull request for Acme App, a reviewer spots `const client = new OpenAI({ apiKey: 'sk-proj-987123456789' });` hardcoded inside `src/lib/ai.ts`. What fix is required before merging? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-06 Acme Writing Assistant takes 15 seconds to generate complete articles. Currently, the UI displays a blank loading spinner until the full text generation is completed, leading to high user drop-off. What API and client architecture changes should we implement to improve perceived performance? | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-18 An unauthenticated public API endpoint `/api/ask-ai` forwards raw query strings straight to an LLM provider. What rate limiting mechanism must be placed on this endpoint to guard against credit exhaustion? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-15 Acme SaaS uses top-tier flagship GPT-4 models for every task, including simple binary categorization like deciding if a query is 'billing' or 'tech-support'. How should model selection be refactored across our platform to minimize API expenses? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-03 We are building an automated ticket classification service for Acme Support. We set JSON output mode on the completion request. What steps must be implemented in TypeScript when processing the raw LLM response payload before passing data to downstream database services? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-17 During network instability, outbound connections to the LLM vendor stall indefinitely, blocking application server worker threads. What request configuration setting must be applied to all LLM client invocations? | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-13 When indexing a long document with 100 paragraphs, our background processing script iterates over paragraphs with a sequential `for` loop, calling `getEmbedding(paragraph)` on each iteration. How should this embedding task be refactored for throughput? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-01 Our customer support engineering team wants our internal AI bot for Acme Corp to answer questions based on our updated company knowledge base. The underlying documents change weekly. A developer proposed fine-tuning GPT-4 on the document repository every Sunday night. How should we architect this system to handle weekly doc updates efficiently? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-05 Our Acme Knowledge RAG system retrieves 50 text chunks from vector storage and concatenates all of them directly into the system prompt context. Occasionally requests fail with token overflow errors. How should the prompt builder select context chunks prior to dispatching the API request? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-10 An express HTTP handler `/api/generate-report` runs a multi-step LLM batch processing task that takes 25 seconds. HTTP client connections frequently hit 504 Gateway Timeout errors. How should this server request handler architecture be refactored? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-22 We are building a React chat interface component for Acme Assistant. We need CSS styles so user messages align to the right with blue background and assistant messages align to the left with gray background in a flexbox container with auto-scroll to bottom. Provide the CSS flexbox styles. | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-09 Acme Research AI generates research summaries accompanied by academic citations, but users report several cited paper titles do not exist. How should our post-processing pipeline verify factual citations before presenting answers to end users? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-07 Acme SaaS received an unexpected $20,000 monthly bill from OpenAI because a few power users made heavy queries. We need to implement telemetry logging for every outbound LLM request. What specific fields must be recorded in the usage tracking database table for accurate cost allocation? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-04 In our Acme Assistant feature, the code currently builds prompts using string interpolation: `const prompt = 'Analyze this user text for sentiment: ' + userInput`. Security flagged potential prompt injection vulnerabilities. How should we restructure the API request payload to isolate untrusted user input? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-12 Acme Search issues fresh API network calls to generate text embeddings for every user query, even for identical repeated searches like 'pricing' or 'login issue'. How should the search embedding service optimize network overhead and cost? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-08 When our primary LLM provider suffers outages or rate limits, Acme Web App throws 500 error screens to end users. How should we construct the resilient API client wrapper for mission-critical user features? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-02 We are designing the document retrieval pipeline for Acme Corp's legal research tool. We need high recall for exact legal statutes and technical terms as well as conceptual semantic similarity. What multi-stage search architecture should we use before feeding context into the LLM prompt? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-11 Engineers working on Acme Assistant edit system prompt strings inline within application source code, which routinely introduces unexpected regressions in output format. What development workflow and test automation setup should be implemented? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
▸case-14 Our support query classifier misclassifies edge cases involving customer sarcastic phrasing. The lead engineer proposed immediately creating a fine-tuned model checkpoint with 50 examples. What prompt and context optimization steps should we execute before resorting to fine-tuning? | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |