All Huawei exams
Free H13-311 practice test: 30 questions with answers
30 original questions for HCIA-AI V4.0, drawn from every topic area. Answer each one to see whether you got it right and why. No sign-up.
- Free questions
- 30
- Full bank
- 112 questions
- Real exam
- 90 min
- Passing score
- 600/1000
All 30 H13-311 questions with answers
The same questions as the test above, grouped by exam topic. Open any question to see the answer and explanation.
Basics of Deep Learning and Foundation Models (5 questions)
Question 1
A student builds a single perceptron to learn the XOR function. Despite many training epochs, the perceptron never classifies all four input patterns correctly. What best explains this result?
- AThe learning rate was set too high, which stops any perceptron from learning binary functions of any kind
- BPerceptrons accept only continuous numeric inputs, so binary XOR inputs cannot be processed by the model
- CXOR is not linearly separable, so one perceptron cannot draw the single straight boundary that the task needs
- DThe perceptron uses a softmax output layer, which is unable to represent exactly two output classes at once
Show answer and explanationHide answer
Correct answer: CXOR outputs 1 only when the two inputs differ, so no single straight line separates the classes, and a single perceptron is limited to linearly separable problems. A learning rate problem would not block all binary functions, perceptrons accept numeric inputs including binary ones, and perceptrons typically use a step activation rather than softmax.
Question 2
Which activation function maps any real input into the range between 0 and 1, which makes it a common choice for producing a probability-like output?
- ASigmoid, which maps any input smoothly into the open range between zero and one
- BTanh, which maps any input smoothly into the range from negative one to positive one
- CReLU, which passes positive values through unchanged and maps every negative value to zero
- DLinear activation, which returns its input unchanged without squashing it into any fixed range
Show answer and explanationHide answer
Correct answer: AThe sigmoid function squashes any real number into the interval between 0 and 1, so it suits binary probability outputs. Tanh produces values between -1 and 1, ReLU has no upper limit on its positive side, and a linear activation performs no squashing at all.
Question 3
While training a fully-connected network, the loss jumps up and down sharply after every parameter update and never settles. Which adjustment is the most direct first step?
- AIncrease the learning rate so the parameters move faster toward the minimum of the loss surface
- BReduce the learning rate so that each gradient descent update takes a smaller step
- CRemove all hidden layers so the network has fewer parameters to update during each training step
- DDouble the number of training epochs while leaving every other setting in the training run unchanged
Show answer and explanationHide answer
Correct answer: BLarge oscillations in loss after each update are a classic sign that gradient descent steps are too big, so lowering the learning rate is the standard first fix. Raising the rate would worsen the oscillation, removing hidden layers changes model capacity rather than step size, and more epochs do not address unstable updates.
Question 4
An engineer designs a network to detect edges and textures in grayscale photographs. Which layer type applies learnable filters that slide across the image to produce feature maps?
- AConvolutional layer, which applies learnable kernels across local regions of the input to produce feature maps
- BPooling layer, which keeps only the maximum or average value in each local window of the feature map
- CRecurrent layer, which carries a hidden state from one time step to the next across a long sequence
- DEmbedding layer, which maps discrete tokens to dense vectors of fixed length for downstream processing
Show answer and explanationHide answer
Correct answer: AConvolutional layers use learnable kernels that slide over local regions to produce feature maps, which suits edge and texture detection. Pooling layers have no learnable filters and only downsample, recurrent layers process sequences over time, and embedding layers map tokens to vectors rather than scanning images.
Question 5
A model that reads long customer chat histories fails to connect details mentioned at the start of a conversation with questions asked at the end. Gradients shrink as they travel back through many time steps. Which architecture is designed to address this long-range dependency problem?
- ALSTM, which uses gates to control what information is kept or discarded across time steps
- BA single perceptron, which computes one weighted sum followed by a step activation function
- CA CNN with max pooling, which summarizes local spatial regions of an input grid
- DK-means clustering, which groups unlabeled samples into a fixed number of clusters
Show answer and explanationHide answer
Correct answer: ALSTM cells use input, forget and output gates to regulate memory, which helps preserve information over long sequences and reduces vanishing gradients. A single perceptron, a max-pooling CNN and K-means are not designed to carry memory across sequence steps, so none of them addresses this problem.
Machine Learning Overview (5 questions)
Question 6
A telecom company has historical records in which every customer is already tagged as either cancelled or retained. It wants a model that estimates which current customers are likely to cancel. Which learning paradigm best fits this requirement?
- AUnsupervised learning, using clustering to discover hidden groups among customers without any labels
- BSupervised learning, using the labeled historical records to train a classifier that predicts the outcome
- CReinforcement learning, using a reward signal that the system receives after each customer decision
- DDimensionality reduction, using principal components to compress the customer data into fewer features
Show answer and explanationHide answer
Correct answer: BLabeled historical outcomes paired with a target to predict define supervised learning, here a classification task. Clustering ignores the existing labels, reinforcement learning needs an agent learning from rewards over time, and dimensionality reduction does not predict an outcome.
Question 7
Which task is an example of unsupervised learning?
- APredicting the sale price of a house from labeled records of past transactions
- BClassifying incoming emails as spam or not spam using a set of labeled examples
- CGrouping customers into segments by purchasing behavior without any labels
- DEstimating tomorrow's temperature from labeled historical weather observations
Show answer and explanationHide answer
Correct answer: CUnsupervised learning works on unlabeled data to find structure, and grouping customers into segments by behaviour is a clustering task. The other three options all learn from labeled examples to predict a known target, which makes them supervised learning.
Question 8
A data scientist trains a decision tree that scores 99% on the training data but only 62% on unseen test data. Which problem is most likely occurring, and which action is a standard remedy?
- AUnderfitting, which is typically reduced by making the tree shallower so that it captures fewer patterns
- BVanishing gradients, which is typically reduced by adding more sigmoid activation layers to the model
- CData leakage, which is typically reduced by shuffling the class labels inside the training data
- DOverfitting, which is typically reduced by pruning the tree or limiting its maximum depth
Show answer and explanationHide answer
Correct answer: DA large gap between training and test accuracy signals overfitting, which pruning or a depth limit reduces. Underfitting would show low training accuracy and a shallower tree would make it worse, shuffled labels would destroy learning, and decision trees are not trained with gradients.
Question 9
A marketing team holds 50,000 website visitor sessions with no labels and wants to form a fixed number of behavioural segments. The analyst must choose the number of segments before running the algorithm. Which algorithm is the most appropriate choice?
- ALinear regression, which predicts a continuous numeric value from a set of input features
- BK-means clustering, which partitions unlabeled data into k groups that are set in advance
- CLogistic regression, which estimates the probability of each class from labeled outcomes
- DSupport vector machine, which finds a maximum-margin boundary between labeled classes
Show answer and explanationHide answer
Correct answer: BK-means is an unsupervised clustering method that requires the number of clusters k to be chosen beforehand, which fits an unlabeled segmentation task. Linear and logistic regression both need labeled targets, and a support vector machine is a supervised classifier, so none of them fits this task.
Question 10
A fraud model flags 100 transactions as fraudulent. Of these, 80 are truly fraudulent and 20 are legitimate. The model also misses 40 fraudulent transactions that it did not flag. What is the precision of the model?
- A0.20, since 20 legitimate transactions were incorrectly flagged as fraud by the model
- B0.67, since only 80 of the 120 truly fraudulent transactions were flagged by the model
- C0.40, since the model missed 40 fraudulent transactions that it did not flag at all
- D0.80, since 80 of the 100 flagged transactions were truly fraudulent
Show answer and explanationHide answer
Correct answer: DPrecision is true positives divided by all predicted positives: 80 / (80 + 20) = 0.80. The 0.67 value is recall (80 / 120), while 0.40 and 0.20 do not measure precision, and 0.20 is only the false positive share, the complement of precision.
AI Development Framework (5 questions)
Question 11
Which characteristic best describes PyTorch's default execution model?
- AA static computation graph that must be fully compiled before any training data is processed
- BCPU-only execution, with no support for GPU or other hardware accelerators at all
- CA dynamic computation graph that is built as operations run, which makes debugging easier
- DA mandatory conversion of every model into a separate exchange format before it can be trained
Show answer and explanationHide answer
Correct answer: CPyTorch builds its graph dynamically while the code executes, so developers can inspect intermediate values and debug with ordinary Python tools. Static graphs are a different execution style, PyTorch supports GPU acceleration, and models do not need to be converted before training.
Question 12
A developer's PyTorch training loop calls loss.backward() and optimizer.step() on every batch, but parameter updates keep building on gradients from earlier batches and training becomes unstable. Which call is most likely missing?
- Amodel.eval() before each training step, to switch the layers into inference mode
- Btorch.save() after each batch, to store a checkpoint of the current weights
- CIncreasing the batch size for each update, so that gradients are averaged over more samples
- Doptimizer.zero_grad() before each backward pass, to clear the gradients from the previous batch
Show answer and explanationHide answer
Correct answer: DPyTorch accumulates gradients across backward calls unless they are cleared, so optimizer.zero_grad() must run before each backward pass. Calling model.eval() changes layers such as dropout, saving a checkpoint does not alter gradients, and a larger batch size does not stop accumulation.
Question 13
A data scientist builds a custom neural network in PyTorch that needs its own layers, automatic tracking of trainable parameters, and a forward method that runs when the model is called. Which base class should the custom model class inherit from?
- Atorch.nn.Module, the base class for neural network layers and complete models in PyTorch
- Btorch.optim.Optimizer, the base class that applies parameter update rules during training
- Ctorch.Tensor, the class that stores multi-dimensional numerical arrays for computation
- Dtorch.utils.data.Dataset, the base class for wrapping collections of training samples
Show answer and explanationHide answer
Correct answer: Atorch.nn.Module provides parameter registration, nesting of sub-modules, and the call mechanism that runs forward. Tensor stores data, Optimizer applies updates and Dataset organises samples, so none of them is the right base class for a model.
Question 14
Which sequence best describes a typical AI application development process?
- AModel training, then deployment, then data collection, and evaluation carried out only on the training data
- BDeployment first, then data collection, model training, and finally monitoring with no further changes to the model
- CData preparation, model training and evaluation, deployment, then monitoring with iterative improvement
- DMonitoring first, then data labeling, then deployment, with training started only after the application is live
Show answer and explanationHide answer
Correct answer: CA typical workflow prepares data, trains and evaluates the model, deploys it, and then monitors and improves it over time. The other sequences deploy before a trained model exists, evaluate only on training data, or start from monitoring and place training after the application is live.
Question 15
Which Huawei product family is designed as an AI processor line for accelerating neural network training and inference?
- AKunpeng ARM-based server CPUs, which run general-purpose computing workloads in data centres
- BBalong baseband chips, which handle the signal processing needed for cellular modem connections
- CHarmonyOS, a distributed operating system designed to run across connected consumer devices
- DAscend AI processors, which accelerate training and inference workloads for neural networks
Show answer and explanationHide answer
Correct answer: DAscend is Huawei's AI processor series, used in accelerators for training and inference. Kunpeng is a server CPU family, Balong handles cellular baseband processing, and HarmonyOS is an operating system, so none of them is an AI processor line.
AI Business Process Overview (5 questions)
Question 16
A bank wants to use AI to reduce the number of loans that default. No data has been gathered and no model has been chosen. Which step should come first in the AI business process?
- ADeploy a finished model to every branch so that staff can begin using it right away for decisions
- BDefine the business problem, the decision it supports, and how success will be measured
- CSelect the most complex deep learning architecture available so that the model captures every pattern
- DPurchase a large cluster of GPU servers before any requirements are written down or agreed upon
Show answer and explanationHide answer
Correct answer: BAn AI business process starts by framing the problem, the decision it supports and the success metrics, which then guide data and model choices. Deployment, architecture selection and hardware purchases all come before the requirements are known, which risks wasted effort.
Question 17
What is the main purpose of prompt engineering when working with a large language model?
- ARetraining every parameter of the model on a new corpus to change the knowledge it stores permanently
- BCompressing the model so that it fits on a low-memory mobile device and can run offline without a network
- CDesigning the input instructions, context and examples so that the model produces a more useful output
- DLabeling a training dataset so that a supervised classifier can learn from the examples provided to it
Show answer and explanationHide answer
Correct answer: CPrompt engineering shapes the model's behaviour through the input text, such as instructions, context and examples, without changing its weights. Retraining, compression and data labeling are separate techniques that change the model or its data pipeline rather than the prompt.
Question 18
A company's internal assistant answers questions about current pricing incorrectly because the base language model was trained a year ago. The company does not want to retrain the model. Which approach best addresses this?
- ATraining a new model from random weights on public internet text to replace the current assistant entirely
- BRaising the temperature setting so that the model draws more heavily on newer knowledge when it writes an answer
- CRetrieval-augmented generation, which fetches the current pricing documents and adds them to the prompt
- DDeleting the tokenizer so that outdated pricing terms are removed from the model's vocabulary completely
Show answer and explanationHide answer
Correct answer: CRetrieval-augmented generation fetches up-to-date documents at query time and supplies them in the prompt, so no retraining is required. A higher temperature only increases randomness, training from scratch is costly, and removing the tokenizer would break the model rather than update its knowledge.
Question 19
Which two statements about using large language models in an application are correct? (Choose two.)
- AA lower temperature setting usually produces more consistent and predictable responses from the model
- BHallucination describes fluent output that contains statements which are incorrect or not supported by facts
- CEach token is always exactly one word, regardless of the language or the text being processed by the model
- DA larger context window removes the need to supply any external data to the model for accurate answers
- EPrompt engineering permanently changes the model's stored weights so that every future user benefits
Show answer and explanationHide answer
Correct answer: A, BLower temperature sharpens the output distribution, and hallucination is the term for confident but incorrect generated text. Tokens are often sub-word pieces rather than whole words, a larger context window still cannot use information it was never given, and prompt engineering changes only the input, not the stored weights.
Question 20
A company deployed a model that forecasts weekly demand. Which stage of the AI business process checks whether the model delivers the expected business value after go-live and feeds the findings into the next improvement cycle?
- AWriting the initial problem statement so that the forecasting goal is clearly defined for the team
- BPost-deployment evaluation and operations, which compare live results against business KPIs
- CLabeling historical sales records before any model has been trained on them
- DPurchasing additional storage hardware for the historical sales archive
Show answer and explanationHide answer
Correct answer: BOperations and post-deployment evaluation measure live results against business KPIs and feed the findings into retraining or redesign. Problem definition, data labeling and storage purchases belong to earlier stages and do not confirm business value after go-live.
AI Overview (5 questions)
Question 21
Which statement correctly describes the relationship between artificial intelligence, machine learning and deep learning?
- ADeep learning is the broadest field, containing machine learning, which in turn contains artificial intelligence as a subset
- BArtificial intelligence is the broadest field, machine learning is a subset of it, and deep learning is a subset of machine learning
- CMachine learning and deep learning are separate fields that apply only to robotics and physical control systems in industry
- DArtificial intelligence is a narrow subset of machine learning that is used mainly for image recognition tasks in research labs
Show answer and explanationHide answer
Correct answer: BArtificial intelligence is the umbrella field of building systems that perform intelligent tasks, machine learning is a subset that learns from data, and deep learning is a subset of machine learning built on multi-layer neural networks. The other options reverse the hierarchy or wrongly narrow the scope of AI and machine learning to robotics or image recognition.
Question 22
A company wants its website chatbot to understand free-text questions typed by customers and extract their intent. Which AI technology area is most directly responsible for interpreting the meaning of this written language?
- ANatural language processing, which analyzes and interprets human language text
- BKnowledge graph storage, which records entities and the relationships between them in a graph database
- CSpeech synthesis, which converts written text into audio output that can be played back to users
- DComputer vision, which extracts structured features from images and video frames
Show answer and explanationHide answer
Correct answer: ANatural language processing covers analyzing and interpreting text, which is exactly what intent extraction from typed questions requires. Computer vision works on images, knowledge graphs store relationships rather than interpret sentences, and speech synthesis produces audio from text rather than understanding it.
Question 23
A manufacturer deploys a system that plays a board game far better than any human, but the same system cannot perform any other task. How would this system be classified?
- AGeneral AI, also called strong AI, able to perform any intellectual task that a human can perform
- BNarrow AI, also called weak AI, designed to handle one specific task within a limited domain
- CFoundation model, pretrained once on broad data and then reused across many unrelated tasks
- DSuper AI, which surpasses human intelligence across every domain of activity and reasoning
Show answer and explanationHide answer
Correct answer: BThe system excels at one task and cannot transfer that ability elsewhere, which matches narrow AI. General AI would handle any task a human can and super AI would exceed humans across all domains, so neither fits, and a foundation model describes a reusable pretrained model rather than a level of intelligence.
Question 24
Which statement best describes the broader influence that DeepSeek's efficient, openly released large language models have had on the AI field?
- AThey proved that neural networks can no longer be trained without large volumes of labeled data, ending the role of supervised learning across the whole industry
- BThey showed that capable models could be built at lower cost than expected, drawing attention to efficiency and open weights
- CThey made GPU hardware unnecessary for every AI workload, so accelerator chips would no longer be needed in data centres
- DThey ended research into reasoning models by showing that step-by-step answers never improve the accuracy of a model
Show answer and explanationHide answer
Correct answer: BDeepSeek's releases demonstrated that competitive models could be developed with lower training costs than many expected, which encouraged interest in efficiency and open weights across the industry. The other statements are false, since they claim supervised learning has ended, GPUs have become unnecessary or reasoning research has stopped.
Question 25
An AI policy panel lists four statements. Which one describes an open, disputed question about the future of AI rather than a settled technical fact?
- AWhether AI systems will match human performance across all cognitive tasks, and when, is still debated
- BNeural networks learn their parameters from training data through an iterative optimization process such as gradient descent, adjusting weights step by step
- CConvolutional networks can process images by applying learnable filters to small local regions
- DComputers can store and retrieve binary data far faster than a human can recall written notes
Show answer and explanationHide answer
Correct answer: AExperts disagree about whether and when general AI matching humans across all cognitive tasks will arrive, so this remains an open debate about the future. The other three statements describe established facts about data storage, neural network training and convolutional filters.
Cutting-edge AI Applications (5 questions)
Question 26
A research lab uses a deep learning system to predict the three-dimensional structure of proteins from their amino acid sequences, which speeds up drug discovery. Which AI application area does this work belong to?
- AIntelligent recommendation, which predicts the items a user is most likely to prefer
- BSmart homes, which automate household devices by using data from connected sensors
- CVoice assistants, which convert spoken requests into actions and responses for the user
- DAI4Science, which applies AI methods to scientific research such as structure prediction
Show answer and explanationHide answer
Correct answer: DAI4Science covers applying AI to advance scientific research, and protein structure prediction is a leading example. The other areas concern user preference prediction, household automation and spoken commands, none of which matches scientific structure prediction.
Question 27
A robot vacuum builds a map of an unfamiliar room while, at the same time, estimating where it is located within that map. Which technique does this describe?
- ACollaborative filtering, which predicts a user's preferences from the ratings given by similar users
- BSpeech synthesis, which converts text into natural-sounding audio for playback
- CSLAM, which performs simultaneous localization and mapping from onboard sensor data
- DMax pooling, which keeps the strongest activation in each window of a feature map
Show answer and explanationHide answer
Correct answer: CSLAM, short for simultaneous localization and mapping, builds a map while tracking the robot's position using sensors. Collaborative filtering is a recommendation technique, speech synthesis produces audio, and max pooling is a CNN operation, so none of them describes mapping and localization together.
Question 28
A smart speaker must transcribe a spoken request, work out what the user wants, and then speak a reply aloud. Which component is responsible for the final step of speaking the reply?
- AText-to-speech synthesis, which converts the reply text into audio output that the speaker plays
- BAutomatic speech recognition, which converts the user's audio into a text transcript of the request
- CNatural language understanding, which extracts the intent and entities from the transcribed request text
- DWake-word detection, which listens locally for a trigger phrase before recording the spoken request
Show answer and explanationHide answer
Correct answer: AText-to-speech synthesis turns the reply text into audio, which is the final step of the voice pipeline. Speech recognition produces the transcript, language understanding extracts intent, and wake-word detection only starts the interaction, so none of them speaks the reply.
Question 29
An autonomous car's perception module fuses camera and radar data to detect pedestrians and vehicles around it. Which later stage decides the trajectory and speed the car should follow?
- AData labeling, which attaches ground-truth annotations to recorded driving footage used to train the perception models
- BModel compression, which reduces the size of the perception network so that it can run on limited in-vehicle hardware
- CPlanning and control, which chooses a safe trajectory and speed and sends commands to the vehicle's actuators
- DRecommendation ranking, which orders candidate routes by predicted user preference for the navigation app
Show answer and explanationHide answer
Correct answer: CPlanning and control take the perceived scene and decide how the vehicle should move, then command steering, throttle and braking. Data labeling, model compression and recommendation ranking support perception or other services and do not choose the vehicle's motion.
Question 30
A smart thermostat learns when a household usually leaves and returns, then starts heating the home shortly before the residents arrive. Which AI application area does this belong to?
- AIntelligent vehicles, which perceive road conditions and control steering, braking and acceleration
- BAI4Science, which applies machine learning to research problems such as molecular or climate modelling
- CSmart homes, which use learned routines and sensor data to automate household comfort and energy use
- DIntelligent recommendation, which ranks products or content for each user based on past behaviour
Show answer and explanationHide answer
Correct answer: CLearning household routines from sensor data to automate heating for comfort and energy savings is a smart home application. Vehicles, scientific research and product recommendation involve different sensing and decision tasks, so they do not match this scenario.
Want more H13-311 questions?
The full bank has 112 questions with answers and explanations, as a PDF, an online practice exam, or both.
Both formats together. The best value.
Instant access after payment, with 90 days of updates. Checkout is on our store, AIExamCerts.