ACP-220 study materials
ACP-220 study resources

ACP-220 cheat sheet

ACP-220 · Keep the key ideas within reach.

Quick reference

AI Model and Product Knowledge

  • Model families on Alibaba Cloud Model Studio include Qwen text generation (qwen-max, qwen-plus, qwen-turbo), Qwen-VL multimodal, Qwen-Audio, and Qwen-Coder code models.

  • qwen-turbo prioritizes latency and cost; qwen-plus balances quality and price; qwen-max targets highest reasoning quality at higher cost and latency.

  • Context window is measured in tokens; a common rule of thumb is 1 Chinese character ≈ 1 token and 1 English word ≈ 1.3 tokens.

  • max_tokens caps generated output length, not input length; input plus output must fit inside the model's context window.

  • temperature controls randomness (higher = more diverse), top_p performs nucleus sampling; adjust one of the two, not both simultaneously.

  • Streaming (incremental output via SSE) reduces perceived latency but does not change total token billing.

  • Qwen-VL accepts image plus text input; images are converted to tokens, so image resolution affects token consumption and cost.

  • Embedding models (text-embedding) return dense vectors used for semantic search and RAG retrieval; they do not generate text.

Quick reference

Model Studio and Generative AI Application Development

  • Model Studio applications are built from prompt templates, knowledge bases (RAG), plugins, and workflow orchestration.

  • RAG pipeline stages: document parsing → chunking → embedding → vector storage → retrieval → rerank → prompt assembly → LLM generation.

  • Chunk size and overlap are the primary retrieval tuning knobs; smaller chunks improve precision, larger chunks preserve context.

  • Plugins extend an application with external APIs or tools; the model selects a tool via function/tool calling and the platform executes it.

  • API access uses an API key in the Authorization header with DashScope-compatible endpoints; keys should be scoped and rotated.

  • Structured output can be enforced with JSON mode or function calling schemas to make downstream parsing deterministic.

  • Prompt templates support variables injected at runtime; system prompts set role and constraints, user prompts carry the query.

  • Evaluation of an application should track retrieval hit rate, answer faithfulness, and latency alongside token cost.

Quick reference

Platform for AI (PAI) and Model Lifecycle

  • PAI provides modules for data preparation, training (PAI-DLC), interactive development (DSW), and online inference (PAI-EAS).

  • PAI-DLC runs distributed training jobs on managed clusters; PAI-DSW is a notebook IDE for exploration and experimentation.

  • PAI-EAS deploys models as elastic inference services with autoscaling, versioning, and traffic splitting for canary rollout.

  • Model lifecycle: data labeling → training → evaluation → registration in a model repository → deployment → monitoring → retraining.

  • Fine-tuning (SFT) adapts a base model to a task; LoRA/QLoRA reduce trainable parameters and GPU memory versus full fine-tuning.

  • Evaluation metrics depend on task: accuracy/F1 for classification, BLEU/ROUGE for generation, perplexity for language modeling.

  • Model monitoring tracks latency, QPS, error rate, and data drift; drift signals trigger retraining or rollback.

  • Training cost scales with GPU-hours; batch size and learning rate are tuned jointly, and mixed precision lowers memory footprint.

Quick reference

AI Coding

  • AI coding assistants generate code from natural-language intent, complete partial code, and explain or refactor existing code.

  • Effective prompts for code specify language, framework, input/output contract, error handling, and constraints explicitly.

  • Generated code must be reviewed and tested; models can produce plausible but incorrect APIs or deprecated method calls.

  • Unit tests and type checks act as verification gates for AI-generated changes before merge.

  • Context supplied to the assistant (open files, repository conventions) strongly affects output relevance and style consistency.

  • Code completion differs from chat-based generation: completion is inline and latency-sensitive, chat supports multi-turn reasoning.

  • Security review is required because generated code may introduce injection flaws, hardcoded secrets, or unsafe dependencies.

  • Agentic coding workflows iterate: plan → edit files → run tests → read failures → revise, rather than one-shot generation.

Quick reference

Multimodal and Speech Services

  • Speech-to-text (ASR) converts audio to text; text-to-speech (TTS) converts text to audio, both exposed as cloud APIs.

  • ASR accuracy depends on sample rate, channel count, background noise, and domain vocabulary; custom hotwords improve recognition of names.

  • TTS supports voice selection, speaking rate, and pitch; output audio format (e.g., PCM, WAV, MP3) must match the consumer.

  • Streaming ASR returns partial results as audio arrives, enabling real-time subtitles; non-streaming returns one final transcript.

  • Multimodal models accept image, audio, and text; modality tokens count toward context and billing like text tokens.

  • OCR extracts text from images; for scanned documents, layout-aware parsing improves table and multi-column accuracy.

  • Audio is typically 16 kHz mono PCM for ASR; resampling and channel downmix are common preprocessing steps.

  • Latency budgets for voice interaction require streaming pipelines end-to-end: capture → ASR → LLM → TTS → playback.