Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Advanced usage

Techniques for controlling model behavior including achieving deterministic outputs via seed parameters, managing token consumption for cost and latency, and configuring model parameters like frequency and presence pe...

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Advanced usage

Techniques for controlling model behavior including achieving deterministic outputs via seed parameters, managing token consumption for cost and latency, and configuring model parameters like frequency and presence pe...

When To Use

Use when you need to implement reproducible model outputs, optimize API costs through token management, or fine-tune text generation behavior using specific model parameters.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/advanced-usage-workflow-guide.mdA guide covering advanced model parameters including reproducibility, token management, and frequency and presence penalties.Questions about a guide covering advanced model parameters including reproducibility, token management, and frequency and presence pe...
examples/advanced-usage-openai-advanced-usage-num-tokens.pythonA Python function using tiktoken to calculate the number of tokens used by a list of messages for a specific model.Exact payloads, commands, or snippets shown in A Python function using tiktoken to calculate the number of tokens used by a list of messages for a specific model.
examples/advanced-usage-openai-advanced-usage-python-system-message-examples.pythonA Python script demonstrating the use of multiple system messages and specific user/assistant roles to guide model behavior.Exact payloads, commands, or snippets shown in A Python script demonstrating the use of multiple system messages and specific user/assistant roles to guide model be...
examples/advanced-usage-openai-api-python-token-count.pythonA Python script demonstrating how to retrieve and print the number of prompt tokens used in an OpenAI API chat completion request.Exact payloads, commands, or snippets shown in A Python script demonstrating how to retrieve and print the number of prompt tokens used in an OpenAI API chat comple...
examples/advanced-usage-openai-advanced-usage-frequency-presence-penalty.pythonA Python code example demonstrating how to implement frequency and presence penalties in an OpenAI API request.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to implement frequency and presence penalties in an OpenAI API request.

What This Skill Covers

  • OpenAI's text generation models (often called generative pre-trained transformers or large language models) have been trained to understand natural language,...
  • Main sections: Reproducible outputs, Managing tokens, Parameter details, Frequency and presence penalties, Token log probabilities.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/advanced-usage.md