[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"me":3,"catalog:en:ai-engineer\u002Frag-generation-context":4,"config":193},null,{"field_key":5,"field_name":6,"seniority":7,"topic_key":8,"topic_name":9,"spec_key":7,"spec_name":7,"locale":10,"cell_total":11,"field_total":12,"seniorities":13,"topics":17,"specs":97,"samples":108},"ai-engineer","AI Engineer","","rag-generation-context","Rag Generation Context","en",75,2025,[14,15,16],"junior","mid","senior",[18,21,24,27,30,33,36,39,42,45,48,51,54,57,60,63,66,69,72,75,78,81,84,85,88,91,94],{"key":19,"name":20,"count":11},"agents-tool-use","Agents Tool Use",{"key":22,"name":23,"count":11},"aimlops-deployment-strategies-ml","Aimlops Deployment Strategies Ml",{"key":25,"name":26,"count":11},"aimlops-experiment-tracking-reproducibility","Aimlops Experiment Tracking Reproducibility",{"key":28,"name":29,"count":11},"aimlops-feature-store-data-versioning","Aimlops Feature Store Data Versioning",{"key":31,"name":32,"count":11},"aimlops-ml-cicd-pipelines","Aimlops Ml Cicd Pipelines",{"key":34,"name":35,"count":11},"aimlops-model-monitoring-drift-detection","Aimlops Model Monitoring Drift Detection",{"key":37,"name":38,"count":11},"aimlops-model-versioning-registry","Aimlops Model Versioning Registry",{"key":40,"name":41,"count":11},"aipy-async-concurrency-ml-serving","Aipy Async Concurrency Ml Serving",{"key":43,"name":44,"count":11},"aipy-data-pipeline-dataloader","Aipy Data Pipeline Dataloader",{"key":46,"name":47,"count":11},"aipy-gpu-memory-management","Aipy Gpu Memory Management",{"key":49,"name":50,"count":11},"aipy-numpy-vectorization-broadcasting","Aipy Numpy Vectorization Broadcasting",{"key":52,"name":53,"count":11},"aipy-python-ml-packaging-environments","Aipy Python Ml Packaging Environments",{"key":55,"name":56,"count":11},"aipy-tensor-ops-autograd","Aipy Tensor Ops Autograd",{"key":58,"name":59,"count":11},"embeddings-vector-search","Embeddings Vector Search",{"key":61,"name":62,"count":11},"evaluation-testing","Evaluation Testing",{"key":64,"name":65,"count":11},"fine-tuning-adaptation","Fine Tuning Adaptation",{"key":67,"name":68,"count":11},"inference-serving","Inference Serving",{"key":70,"name":71,"count":11},"llm-fundamentals","Llm Fundamentals",{"key":73,"name":74,"count":11},"prompt-engineering","Prompt Engineering",{"key":76,"name":77,"count":11},"rag-chunking-indexing","Rag Chunking Indexing",{"key":79,"name":80,"count":11},"rag-embeddings-similarity","Rag Embeddings Similarity",{"key":82,"name":83,"count":11},"rag-evaluation","Rag Evaluation",{"key":8,"name":9,"count":11},{"key":86,"name":87,"count":11},"rag-reranking-fusion","Rag Reranking Fusion",{"key":89,"name":90,"count":11},"rag-retrieval","Rag Retrieval",{"key":92,"name":93,"count":11},"rag-retrieval-search","Rag Retrieval Search",{"key":95,"name":96,"count":11},"safety-guardrails","Safety Guardrails",[98,102,105],{"key":99,"name":100,"count":101},"llm-rag","LLM\u002FRAG",450,{"key":103,"name":104,"count":101},"mlops","MLOps",{"key":106,"name":107,"count":101},"python","Python",[109,127,140,154,167,180],{"id":110,"topic":9,"difficulty":111,"body":112,"options":113,"correct_key":115,"explanation":126},"019f667f-d986-7506-966c-c8c614ed867e",1,"In a RAG pipeline, retrieval selects candidate chunks, but a separate step decides how those already-retrieved chunks are ordered, filtered, and formatted before they reach the model. What is this step usually called?",[114,117,120,123],{"key":115,"text":116},"a","Context assembly",{"key":118,"text":119},"b","Retrieval re-scoring",{"key":121,"text":122},"c","Query expansion",{"key":124,"text":125},"d","Index building","Context assembly is the step between retrieval and generation that builds the actual prompt: it decides chunk order, filtering, and formatting. Retrieval re-scoring re-ranks candidates during search; query expansion rewrites the user's query for the retriever; index building happens before any query is asked, when embeddings are stored.",{"id":128,"topic":9,"difficulty":111,"body":129,"options":130,"correct_key":118,"explanation":139},"019f667f-d986-7efd-91ed-a39c1274f878","```python\nimport tiktoken\nenc = tiktoken.get_encoding(\"cl100k_base\")\ninstruction = (\n    \"Answer the user's question using only the information in the \"\n    \"context below. If the context does not contain the answer, \"\n    \"say you don't know.\"\n)\nprint(len(enc.encode(instruction)))\n```\nWhat does this print?",[131,133,135,137],{"key":115,"text":132},"21",{"key":118,"text":134},"29",{"key":121,"text":136},"35",{"key":124,"text":138},"44","Encoding the instruction string with the tokenizer above yields 29 tokens (verified by running the snippet). This fixed instruction cost must be subtracted from the abstract context budget before any retrieved chunks are added.",{"id":141,"topic":9,"difficulty":142,"body":143,"options":144,"correct_key":121,"explanation":153},"019f667f-d987-77ea-92d0-ac4857a3110b",2,"The system instruction above costs 29 tokens, the user's query costs 10 tokens, and three retrieved chunks cost 26, 28, and 28 tokens respectively (all counted with the same tokenizer). If the abstract context budget for this request is 120 tokens, what happens when all three chunks are added?",[145,147,149,151],{"key":115,"text":146},"Everything fits, with 1 token to spare",{"key":118,"text":148},"Everything fits exactly at 120 tokens",{"key":121,"text":150},"It does not fit — total is 121 tokens, 1 over budget",{"key":124,"text":152},"It does not fit — total is 132 tokens, 12 over budget","29 + 10 + 26 + 28 + 28 = 121, which is one token over the 120-token budget. At least one chunk (or the query\u002Finstruction) must be trimmed or a chunk dropped before this fits.",{"id":155,"topic":9,"difficulty":142,"body":156,"options":157,"correct_key":124,"explanation":166},"019f667f-d988-70b0-be4e-d5b16cf7d376","Given the same fixed overhead (instruction 29 + query 10 = 39 tokens) and a budget of 120, chunks are added one at a time in order (26, 28, 28 tokens) and a chunk is only kept if the running total stays within budget. How many of the three chunks end up included, and what is the final running total?",[158,160,162,164],{"key":115,"text":159},"3 chunks, 121 tokens",{"key":118,"text":161},"1 chunk, 65 tokens",{"key":121,"text":163},"0 chunks, 39 tokens",{"key":124,"text":165},"2 chunks, 93 tokens","39 + 26 = 65 (fits), 65 + 28 = 93 (fits), 93 + 28 = 121 (exceeds 120, so this chunk is dropped and the loop stops). So 2 chunks are included with a final running total of 93 tokens.",{"id":168,"topic":9,"difficulty":111,"body":169,"options":170,"correct_key":115,"explanation":179},"019f667f-d988-7834-a095-ff47b3c8e092","A context-assembly loop is close to the token budget, and the next candidate chunk would only partially fit. What is standard practice?",[171,173,175,177],{"key":115,"text":172},"Drop the chunk entirely, keep only whole chunks",{"key":118,"text":174},"Truncate the chunk mid-sentence to fill the remaining budget",{"key":121,"text":176},"Summarize the chunk on the fly before inserting it",{"key":124,"text":178},"Split the remaining budget evenly across all chunks","Truncating a chunk mid-sentence risks cutting off exactly the fact that was needed and inserting a nonsensical fragment. The standard approach in basic context assembly is whole-chunk-or-nothing inclusion: a chunk that doesn't fully fit is skipped rather than cut.",{"id":181,"topic":9,"difficulty":142,"body":182,"options":183,"correct_key":118,"explanation":192},"019f667f-d989-70d9-8ac0-6b68312e1105","A RAG system assembles 7 retrieved chunks into the prompt, all of which are correctly relevant. The single most important chunk sits at position 4 (the middle). The model's answer misses the fact from that chunk. What is most likely happening?",[184,186,188,190],{"key":115,"text":185},"The chunk's embedding was corrupted during retrieval",{"key":118,"text":187},"Position in a long context reduced attention to that chunk",{"key":121,"text":189},"The chunk exceeded a per-chunk token limit and was silently dropped",{"key":124,"text":191},"Retrieval failed to find the chunk at all","This is the \"lost in the middle\" effect: retrieval and assembly both worked correctly (the chunk is present in the prompt), but its position in the middle of a long context makes it less likely to be used in the answer — an attention\u002Fpositional issue, not a retrieval failure.",{"fields":194,"seniorities":372,"interview_shapes":373,"locales":378,"oauth":380,"question_count":383,"coach_enabled":384,"jd_match_enabled":384},[195,218,238,255,279,286,305,324,346,353,359,366],{"key":196,"name_tr":197,"name_en":197,"sort":111,"specializations":198},"backend","Backend",[199,202,205,206,209,212,215],{"key":200,"name":201,"field":196},"general","Genel",{"key":203,"name":204,"field":196},"go","Go",{"key":106,"name":107,"field":196},{"key":207,"name":208,"field":196},"java","Java",{"key":210,"name":211,"field":196},"csharp","C#\u002F.NET",{"key":213,"name":214,"field":196},"nodejs","Node.js",{"key":216,"name":217,"field":196},"php","PHP",{"key":219,"name_tr":220,"name_en":220,"sort":142,"specializations":221},"frontend","Frontend",[222,223,226,229,232,235],{"key":200,"name":201,"field":219},{"key":224,"name":225,"field":219},"javascript","JavaScript",{"key":227,"name":228,"field":219},"typescript","TypeScript",{"key":230,"name":231,"field":219},"react","React",{"key":233,"name":234,"field":219},"vue","Vue",{"key":236,"name":237,"field":219},"angular","Angular",{"key":239,"name_tr":240,"name_en":240,"sort":241,"specializations":242},"fullstack","Fullstack",3,[243,244,245,246,247,248,249,250,251,252,253,254],{"key":200,"name":201,"field":239},{"key":203,"name":204,"field":196},{"key":106,"name":107,"field":196},{"key":207,"name":208,"field":196},{"key":210,"name":211,"field":196},{"key":213,"name":214,"field":196},{"key":216,"name":217,"field":196},{"key":224,"name":225,"field":219},{"key":227,"name":228,"field":219},{"key":230,"name":231,"field":219},{"key":233,"name":234,"field":219},{"key":236,"name":237,"field":219},{"key":256,"name_tr":257,"name_en":257,"sort":258,"specializations":259},"devops-cloud","DevOps \u002F Cloud",4,[260,261,264,267,270,273,276],{"key":200,"name":201,"field":256},{"key":262,"name":263,"field":256},"aws","AWS",{"key":265,"name":266,"field":256},"gcp","GCP",{"key":268,"name":269,"field":256},"azure","Azure",{"key":271,"name":272,"field":256},"kubernetes","Kubernetes",{"key":274,"name":275,"field":256},"terraform","Terraform",{"key":277,"name":278,"field":256},"linux","Linux",{"key":5,"name_tr":6,"name_en":6,"sort":280,"specializations":281},5,[282,283,284,285],{"key":200,"name":201,"field":5},{"key":106,"name":107,"field":5},{"key":99,"name":100,"field":5},{"key":103,"name":104,"field":5},{"key":287,"name_tr":288,"name_en":289,"sort":290,"specializations":291},"database","Veritabanı","Database",6,[292,293,296,299,302],{"key":200,"name":201,"field":287},{"key":294,"name":295,"field":287},"postgresql","PostgreSQL",{"key":297,"name":298,"field":287},"mysql","MySQL",{"key":300,"name":301,"field":287},"mongodb","MongoDB",{"key":303,"name":304,"field":287},"redis","Redis",{"key":306,"name_tr":307,"name_en":308,"sort":309,"specializations":310},"mobile","Mobil","Mobile",7,[311,312,315,318,321],{"key":200,"name":201,"field":306},{"key":313,"name":314,"field":306},"ios-swift","iOS (Swift)",{"key":316,"name":317,"field":306},"android-kotlin","Android (Kotlin)",{"key":319,"name":320,"field":306},"flutter","Flutter",{"key":322,"name":323,"field":306},"react-native","React Native",{"key":325,"name_tr":326,"name_en":327,"sort":328,"specializations":329},"security","Güvenlik","Security",8,[330,331,334,337,340,343],{"key":200,"name":201,"field":325},{"key":332,"name":333,"field":325},"appsec","AppSec",{"key":335,"name":336,"field":325},"offensive-pentest","Offensive \u002F Pentest",{"key":338,"name":339,"field":325},"cloud-security","Cloud Security",{"key":341,"name":342,"field":325},"devsecops","DevSecOps",{"key":344,"name":345,"field":325},"blue-team-incident","Blue Team \u002F Incident",{"key":347,"name_tr":348,"name_en":349,"sort":350,"specializations":351},"qa-test-automation","QA \u002F Test Otomasyonu","QA \u002F Test Automation",9,[352],{"key":200,"name":201,"field":347},{"key":354,"name_tr":355,"name_en":355,"sort":356,"specializations":357},"data-engineer","Data Engineer",10,[358],{"key":200,"name":201,"field":354},{"key":360,"name_tr":361,"name_en":362,"sort":363,"specializations":364},"game-dev","Oyun Geliştirme","Game Development",11,[365],{"key":200,"name":201,"field":360},{"key":367,"name_tr":368,"name_en":368,"sort":369,"specializations":370},"ml-engineer","ML Engineer",12,[371],{"key":200,"name":201,"field":367},[14,15,16],{"junior":374,"mid":376,"senior":377},{"questions":375,"median_sec":3},20,{"questions":375,"median_sec":3},{"questions":375,"median_sec":3},[379,10],"tr",[381,382],"google","github",21750,true]