Courseiva
Software Development →easyMultiple Choice

NCA-GENL Software Development Practice Question

A developer is writing an application that calls an NVIDIA-hosted LLM endpoint and needs to keep multi-turn context across several user messages. Which payload structure should the application send to the chat completions API?

⚠ Common exam trap

The trap here is assuming the endpoint accepts a single concatenated prompt string, when the chat schema requires role-tagged messages to preserve turn structure.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

A 'messages' array of objects, each with a 'role' and 'content', ordered from system to user and assistant turns.

Chat completions APIs from NVIDIA expect an ordered messages array with role and content fields, preserving system, user, and assistant turns. This structure gives the model the turn boundaries it needs for coherent multi-turn dialogue, unlike a flat prompt string or incomplete history.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    A 'messages' array of objects, each with a 'role' and 'content', ordered from system to user and assistant turns.

    Why this is correct

    The chat completions API expects a messages array where each entry carries a role such as system, user, or assistant and its content. Preserving this ordered structure gives the model clear turn boundaries, enabling correct multi-turn context and instruction adherence across the conversation.

  • ✗

    A 'context' object mapping user IDs to their previous messages.

    Why it's wrong here

    There is no context object keyed by user ID in the chat completions schema. Inventing one means the server ignores it or rejects the request. Conversation state must be expressed as an ordered messages array; the API does not manage per-user history for the application.

  • ✗

    A 'history' array containing only the assistant's prior responses.

    Why it's wrong here

    Including only assistant replies removes the user turns that prompted them, so the model cannot reconstruct the dialogue. The messages array must interleave user and assistant entries in order. Partial history leads to incoherent or context-free responses in a multi-turn setting.

  • ✗

    A single 'prompt' string containing all previous turns concatenated.

    Why it's wrong here

    Many NVIDIA endpoints follow the chat completions schema, where a messages array with roles is expected. Sending one concatenated prompt string may work only on legacy completion-style endpoints and loses role separation, which degrades instruction following and makes multi-turn context handling unreliable.

About these practice questions

One of 367 original NCA-GENL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official NVIDIA exam blueprint

This NCA-GENL practice question is part of Courseiva's free NVIDIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the NCA-GENL exam.