What is prompt caching?
Simple meaning
Prompt caching reuses computation for a repeated prefix such as a long system prompt or static RAG header.
Open the full page for Why, Steps, Example and Key takeaway.
Panel-ready GenAI / LLM questions for freshers and experienced developers. Practice at Coding Cadre in Faridabad, or Online from Delhi NCR.
Prompt caching reuses computation for a repeated prefix such as a long system prompt or static RAG header.
Open the full page for Why, Steps, Example and Key takeaway.
The context window is the maximum number of tokens the model can consider at once, including prompt and usually the completion.
Open the full page for Why, Steps, Example and Key takeaway.
The call fails, or your client must drop history, summarize, or retrieve fewer chunks.
Open the full page for Why, Steps, Example and Key takeaway.
Embedding a whole book as one vector blurs topics and may exceed model limits.
Open the full page for Why, Steps, Example and Key takeaway.
Overlap copies a few tokens or sentences from the end of one chunk into the start of the next.
Open the full page for Why, Steps, Example and Key takeaway.
Hybrid search combines lexical matching such as BM25 with dense vector search.
Open the full page for Why, Steps, Example and Key takeaway.
BM25 is a ranking function for keyword search that scores term frequency with document-length normalization.
Open the full page for Why, Steps, Example and Key takeaway.
BOS marks the start of a sequence, EOS marks the end of generation, and PAD fills batches to equal length.
Open the full page for Why, Steps, Example and Key takeaway.
Often yes with a symmetric embedder, but some models are asymmetric: one tower for queries and one for passages.
Open the full page for Why, Steps, Example and Key takeaway.
A jailbreak is a prompt that tries to bypass safety policy, for example by role-play or hypothetical framing.
Open the full page for Why, Steps, Example and Key takeaway.
A fixed word vocabulary would map rares to unknown and explode in size.
Open the full page for Why, Steps, Example and Key takeaway.
Many BPE vocabularies treat capitalization and leading spaces as part of the token.
Open the full page for Why, Steps, Example and Key takeaway.
Use the same tokenizer the model uses, such as tiktoken for many OpenAI models.
Open the full page for Why, Steps, Example and Key takeaway.
Higher dimensions can hold more nuance but cost more storage, RAM, and distance compute.
Open the full page for Why, Steps, Example and Key takeaway.
Dense vectors are short learned embeddings where every dimension is used.
Open the full page for Why, Steps, Example and Key takeaway.
After unit normalization, inner product equals cosine similarity, which simplifies indexes and scores.
Open the full page for Why, Steps, Example and Key takeaway.
A bi-encoder embeds query and document separately so documents can be precomputed.
Open the full page for Why, Steps, Example and Key takeaway.
Residuals add the block input to its output so gradients flow through deep stacks.
Open the full page for Why, Steps, Example and Key takeaway.
After attention mixes information across tokens, a position-wise MLP transforms each token independently.
Open the full page for Why, Steps, Example and Key takeaway.
Encoder-decoder models such as T5 shine at transduction: translate, summarize, or map a full input to a structured output.
Open the full page for Why, Steps, Example and Key takeaway.