Skip to content

Natural Language Processing

CSE · Final · Summer 25

Batch 62

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Faculty of Science & Information Technology Department of Computer Science & Engineering Final Examination, Summer 2025 Course Code: CSE445, Course Title: Natural Language Processing Level: 3 Term:3 Batch: 62 Time: 02:00 Hrs | Marks: 40 Answer ALL Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1. Explain the architecture and working principle of a Recurrent Neural Network (RNN). In your answer: 1. Describe how the hidden state is updated over time using the input vector, previous hidden state, and weight matrices (include the mathematical equations). 2. Explain the concept of vanishing and exploding gradients in RNNs and how they affect training. 3. Compare RNNs with LSTMs in terms of their ability to capture long-term dependencies. | 10 | CO3 2. Define Large Language Models (LLMs) and explain their key characteristics. In your answer: 1. Describe what a prompt is and how it is used to interact with an LLM. 2. Discuss how prompt design can affect the quality and reliability of the model's output. | 5 | CO5 3. Consider a simple feedforward neural network with: • Input layer: 2 neurons (x1,x2) • Hidden layer: 2 neurons with sigmoid activation • Output layer: 1 neuron with sigmoid activation • Loss function: Mean Squared Error (MSE) Given: • Inputs: x1=0.05, x2=0.10 • Target output: y=0.01 • Initial weights: o From input to hidden: w1,1=0.15, w2,1=0.20 (to hidden neuron h1) w1,2=0.25, w2,2=0.30 (to hidden neuron h2) o From hidden to output: w h1,o=0.40, w h2,o=0.45 • Biases: b h1=b h2=0.35, bo=0.60 • Learning rate: η=0.5 After calculating MSE, you need to apply back propagation and adjust w1,1, w1,2. | 15 | CO3 4. A small dataset of short reviews about phones. We want to discover hidden topics such as Hardware (battery, camera, screen) and Service/Price (price, warranty, support). Vocabulary V={battery, camera, screen, price, warranty, support} Below each document is a short review (words repeated = token counts): • d1: battery camera battery screen • d2: camera screen camera battery • d3: price warranty support price • d4: price support warranty price We choose the number of topics K=2 Use symmetric priors: α=0.5 (document-topic), η=0.5(topic-word). Apply LDA for the above scenario. | 10 | CO2