What is a system prompt?
A system prompt provides high-priority behavioral instructions for an assistant, such as its role, boundaries, and response style. Its exact…
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 1549–1560 of 3610 questions
A system prompt provides high-priority behavioral instructions for an assistant, such as its role, boundaries, and response style. Its exact…
Zero-shot prompting asks a model to perform a task without providing worked examples. It works well for familiar tasks with clear instructions,…
Few-shot prompting includes a small number of input-output examples that demonstrate the expected task or format. The model can infer a pattern…
An instruction tells the model what to do, while context provides information needed to do it. For example, “summarize the following” is an…
Specifying a format reduces ambiguity and makes responses easier to consume. A request for JSON, a table, or a fixed set of fields helps…
A context window is the maximum amount of input and generated content a model can handle in one request, measured in tokens. The effective…
Words are linguistic units separated by language conventions, while tokens are units defined by a tokenizer. One word can map to several tokens,…
Input tokens are the tokens supplied to the model in instructions, user messages, context, and sometimes tool definitions. Output tokens are the…
A special token is a dedicated token ID used for control or structure, such as message boundaries, end-of-turn markers, or multimodal markers.…
An embedding is a numerical vector representing an item such as text, an image, or a product. Text embeddings are designed so that semantic…
Semantic search retrieves items based on meaning represented in embeddings rather than requiring exact keyword overlap. A query and candidate…
Cosine similarity measures the cosine of the angle between two vectors. It is often used to compare embeddings because it focuses on direction…