Browse Python Institute Certification Guides

Python Institute PCAI Sample Questions with Explanations

Python Institute PCAI sample questions with explanations, traps, topic labels, and IT Mastery route links.

These original sample questions are designed to help you check how the exam topics appear in decision-style prompts. They are not taken from the live exam.

Use these sample questions as a guided self-assessment for Certified Associate Python Programmer for AI (PCAI) topics such as Python AI pipelines, embeddings, retrieval, model evaluation, prompt design, data preparation, inference workflow, privacy, and responsible automation. The prompts focus on implementation choices that keep AI behavior testable and controlled.

Where these questions fit in the PCAI guide

The sample set below is part of the Python Institute PCAI guide path:

PCAI applied AI sample questions

Work through each prompt before opening the explanation. PCAI questions combine Python correctness with AI-system judgment: data boundaries, model task, retrieval design, evaluation, and responsible use.


Question 1

Topic: Embedding-based search

A Python application needs to find policy paragraphs that are semantically similar to a user’s question, even when the user does not use the exact words from the policy. Which approach is strongest?

  • A. Sort the policy paragraphs alphabetically and return the first paragraph with the same first letter as the question.
  • B. Create embeddings for policy chunks, embed the user question with the same embedding model, and retrieve chunks by vector similarity.
  • C. Count only exact keyword matches and reject questions that use synonyms.
  • D. Store every policy paragraph as a Python variable and ask users to choose the variable name.

Best answer: B

Explanation: Embeddings are designed to represent text in a way that supports semantic similarity. Using the same embedding model for stored chunks and user questions makes retrieval less dependent on exact keyword overlap and more suitable for policy questions phrased in different language.

Why the other choices are weaker:

  • A is arbitrary and ignores meaning.
  • C fails when users use related terms instead of exact wording.
  • D exposes implementation detail to users and does not solve semantic search.

What this tests: Embeddings, vector similarity, chunk retrieval, and semantic search behavior.

Related topics: Embeddings; Retrieval; Vector search; Similarity; RAG


Question 2

Topic: Human review for AI actions

A Python agent drafts refund decisions from support tickets. The business allows automatic summaries, but refund approval must remain controlled because incorrect approvals can create financial loss. Which workflow is strongest?

  • A. Let the model approve refunds whenever the answer sounds confident.
  • B. Hide the model output from reviewers so they cannot be biased.
  • C. Approve every refund under a small amount without logging the reason.
  • D. Have the model produce a recommendation with supporting evidence, then route the decision to a human or policy-controlled approval step.

Best answer: D

Explanation: The model can assist with summarization and recommendation, but the high-impact decision should stay within an explicit control path. Routing the decision to a reviewer or policy-controlled step preserves accountability and reduces the risk of silent automation mistakes.

Why the other choices are weaker:

  • A treats confidence-sounding language as a control.
  • B removes potentially useful evidence rather than structuring review.
  • C creates unlogged automatic approvals and weakens accountability.

What this tests: Responsible AI automation, human oversight, high-impact decisions, and auditability.

Related topics: Human review; Responsible AI; Automation; Audit trail; Business rules


Question 3

Topic: Evaluating a prompt change

A team changes the prompt template for an AI classification script. The new prompt seems clearer, but they need to know whether it improves accuracy without increasing unsafe outputs. What should they do before replacing the old prompt?

  • A. Run both prompt versions against a representative evaluation set and compare task accuracy, safety failures, and regression cases.
  • B. Deploy the new prompt immediately because simpler wording is always safer.
  • C. Increase the temperature so the model has more chances to find the right answer.
  • D. Ask one developer to try two examples manually and approve the change if both look good.

Best answer: A

Explanation: Prompt changes should be evaluated with repeatable examples and defined criteria. Comparing old and new behavior on representative cases gives the team evidence about accuracy, safety, and regressions instead of relying on impression.

Why the other choices are weaker:

  • B assumes wording quality without measurement.
  • C changes generation behavior and may make outputs less stable.
  • D is too small and informal to support a reliable deployment decision.

What this tests: AI evaluation, regression testing, prompt quality, and deployment discipline.

Related topics: Prompt evaluation; Test sets; Safety; Regression; Model behavior


Question 4

Topic: Data preparation for classification

A dataset contains support ticket text, ticket category, final resolution status, and a timestamp for when the ticket was closed. The goal is to predict resolution status when the ticket is first created. Which feature should be excluded from training?

  • A. Ticket category selected at creation time.
  • B. Text submitted by the customer when the ticket is opened.
  • C. The timestamp for when the ticket was closed.
  • D. The channel through which the ticket was submitted.

Best answer: C

Explanation: The close timestamp is not known when the ticket is first created. Including it would leak future information into the model and make evaluation look better than real prediction-time performance.

Why the other choices are weaker:

  • A, B, and D can be valid features if they are known at creation time and permitted for the use case.

What this tests: Prediction-time availability, leakage, feature selection, and AI workflow design.

Related topics: Feature leakage; Classification; Prediction time; Data preparation; Evaluation

Independent study note

Tech Exam Lexicon and IT Mastery are independent study tools. They are not affiliated with, endorsed by, or sponsored by Python Institute or any certification body.

Revised on Sunday, May 10, 2026