Yomi APIYomi APIDocs Open console

中文

Yomi API / Documentation / Glossary

Knowledge base

Glossary

Text and generation

Token

The smallest unit of text processed by a model. Text is split into tokens, then converted to vectors for computation. A common English word is roughly one token; a Chinese character is roughly one to two. Tokens are also the unit used for billing and measuring context length.

Prompt

The input text sent to a model, containing instructions, questions, context and the desired output format. Strong prompts often include a role, context, instructions, constraints and few-shot examples. Systematic methods for improving prompts are called prompt engineering.

Context window

The maximum tokens a model can process in one call, counting input and output together. It determines the model's short-term memory capacity; beyond the limit, earlier content may be truncated or forgotten. Among models offered by the platform, claude-sonnet-5 has 1M, gpt-5.6-sol has 1.05M and kimi-k3 has 1M. Refer to the Model Catalog for exact limits.

Temperature

A parameter controlling randomness and creativity, commonly from 0 to 2. Low values (0–0.3) produce stable, more deterministic output suited to coding and factual questions. Higher values (0.7 and above) produce more varied output for creative writing and brainstorming.

Top-p (nucleus sampling)

Another randomness control: when generating the next token, sample only from the most likely candidates whose cumulative probability reaches p. Smaller values produce more conservative output; larger values increase variety. Usually adjust temperature or top-p, rather than both at once.

Vectors and retrieval

Embedding

The process of converting text into a fixed-length numeric vector. Semantically similar text lies closer in vector space, supporting semantic search, recommendation systems and RAG. The platform provides the /v1/embeddings endpoint. See the Model Catalog (Models in the console) for available embedding models.

Vector database

A database designed to store, index and retrieve high-dimensional vectors efficiently using similarity search. It is important infrastructure for RAG applications. Common products include Milvus, Pinecone, Chroma, Qdrant and pgvector.

Retrieval-augmented generation (RAG)

Retrieve information relevant to a question from a knowledge base, then provide it to the model together with the question. This lets the model use private data and recent knowledge and substantially reduces hallucinations. It is a common approach for knowledge-based question answering.

Training and architecture

Pre-training and fine-tuning

Pre-training is large-scale self-supervised learning on general data that establishes basic language and knowledge capabilities. Fine-tuning continues training on task-specific data to adapt the model to a particular use case. For most applications, prompt engineering and RAG cover much of the customization needed.

Attention mechanism

The core innovation of the Transformer architecture: for each generated token, dynamically calculate the importance of positions in the input sequence. Self-attention lets each position attend to every other position, capturing long-range dependencies.

Perplexity

A measure of a language model's predictive ability. Lower values indicate greater confidence in predicting text and often more fluent generation. Perplexity does not fully match human judgments of quality; the industry now relies more on benchmarks and human evaluation.