AI 工程编码

题集来源:AMIT SHEKHAR(amitshekhariitbhu)收录项目:ai-engineering-interview-questions查看原题集

题目目录

32 道原题
  1. Implement a basic RAG pipeline using an embedding model and a vector database.

    原题
  2. Build a simple AI agent with tool use (e.g., calculator, web search).

    原题
  3. Implement semantic search using embeddings and cosine similarity.

    原题
  4. Write code for different text chunking strategies (fixed-size, recursive, semantic).

    原题
  5. Implement a prompt template system with variable substitution.

    原题
  6. Build an evaluation pipeline for LLM outputs using LLM-as-a-judge.

    原题
  7. Implement streaming responses for an LLM API.

    原题
  8. Build a simple vector similarity search from scratch.

    原题
  9. Implement a conversation memory system for a chatbot (sliding window, summary, buffer).

    原题
  10. Write code to detect and handle hallucinations in LLM outputs.

    原题
  11. Implement a retry mechanism with exponential backoff for LLM API calls.

    原题
  12. Write a function calling (tool use) handler for an LLM API.

    原题
  13. Implement a simple re-ranker for search results.

    原题
  14. Build a basic document parser that extracts text from PDFs and splits it into chunks.

    原题
  15. Implement cosine similarity, dot product, and Euclidean distance functions from scratch.

    原题
  16. Write code to implement token counting and context window management.

    原题
  17. Build a simple prompt versioning system.

    原题
  18. Implement a caching layer for LLM responses.

    原题
  19. Implement semantic caching for LLM queries (cache responses for semantically similar queries).

    原题
  20. Write code to detect prompt injection attempts in user inputs.

    原题
  21. Implement an LLM output guardrails system that checks for off-topic responses and PII leakage.

    原题
  22. Build a multi-agent system where agents have different roles and collaborate on a task.

    原题
  23. Implement scaled dot-product attention with a causal mask from scratch (NumPy or PyTorch).

    原题
  24. Implement multi-head attention, then convert it to grouped-query attention.

    原题
  25. Implement a KV cache and single-step decode for causal multi-head attention.

    原题
  26. Implement BPE (Byte Pair Encoding) training and encoding from scratch.

    原题
  27. Implement top-k, top-p, and temperature sampling over a logits vector.

    原题
  28. Implement an LRU cache with O(1) get/put, then add per-entry TTL.

    原题
  29. Implement a token-bucket rate limiter for an LLM API where cost scales with tokens, then make it distributed.

    原题
  30. Write an async batch processor that runs an LLM call over 50,000 documents with a concurrency limit, retries with jitter, and error isolation.

    原题
  31. Write a streaming SSE parser for LLM token streams that handles arbitrary chunk boundaries.

    原题
  32. Implement a minimal agent loop with tool dispatch, error handling, and a step budget.

    原题