IB DP · Thinka 原創模擬試題

2025 IB DP Computer Science 模擬試題連答案詳解

Thinka May 2025 HL (TZ2) IB Diploma Programme-Style Mock — Computer Science

195 270 分鐘2025
An original Thinka practice paper modelled on the structure and difficulty of the May 2025 HL (TZ2) IB Diploma Programme Computer Science paper. Not affiliated with or reproduced from IB.

卷一 甲部

Answer all questions. Short theoretical questions targeting key core definitions and system structures.
8 題目 · 25
題目 1 · Short Answer
3.125
An organization is planning to migrate from an old legacy database system to a modern cloud-based system. Compare a direct changeover implementation strategy with a phased implementation strategy by outlining one advantage and one disadvantage of direct changeover.
查看答案詳解

解題

Direct changeover involves immediately stopping the old system and starting the new one. An advantage of this approach is that it is less costly and faster because there is no period of running two systems simultaneously, avoiding duplicate data entry. A disadvantage is that it is highly risky; if the new system fails, there is no backup system to fall back on, which can lead to complete disruption of operations.

評分準則

Award up to 3.125 marks: [1 mark] for identifying a valid advantage of direct changeover (e.g., lower operational costs or faster implementation). [1 mark] for identifying a valid disadvantage (e.g., high risk of failure or no fallback option). [1.125 marks] for explaining these points in direct comparison to the lower-risk, gradual nature of phased implementation.
題目 2 · Short Answer
3.125
Describe the role of end-user feedback during the beta testing phase of software development, and state how beta testing differs from alpha testing.
查看答案詳解

解題

During beta testing, end-users provide feedback by reporting bugs, usability issues, and general user experience when using the pre-release software in their real-world environments. This helps developers identify issues that were not detected in laboratory conditions. Beta testing differs from alpha testing because alpha testing is performed internally by the software development team in a controlled environment before the software is released to any external users.

評分準則

Award up to 3.125 marks: [1 mark] for outlining the role of end-user feedback (identifying real-world bugs and usability issues). [1 mark] for explaining the environment of beta testing (real-world, external environment). [1.125 marks] for clearly contrasting it with alpha testing (internal, controlled environment).
題目 3 · Short Answer
3.125
Outline the specific function of the Program Counter (PC) register during the fetch stage of the machine instruction cycle.
查看答案詳解

解題

The Program Counter (PC) holds the memory address of the next instruction to be fetched and executed. During the fetch stage, the address in the PC is copied to the Memory Address Register (MAR) via the address bus. Once this transfer occurs, the PC is automatically incremented by the control unit to point to the address of the next sequential instruction in memory.

評分準則

Award up to 3.125 marks: [1 mark] for stating that the PC holds the address of the next instruction. [1 mark] for stating that this address is copied to the Memory Address Register (MAR). [1.125 marks] for explaining that the PC is incremented immediately after the transfer to prepare for the subsequent cycle.
題目 4 · Short Answer
3.125
Explain the roles of the Memory Address Register (MAR) and the Memory Data Register (MDR) when the CPU is performing a memory write operation.
查看答案詳解

解題

During a memory write operation, the CPU must specify both the storage location and the data content. The Memory Address Register (MAR) is loaded with the memory address of the RAM location where the write operation will occur. Simultaneously, the Memory Data Register (MDR) is loaded with the actual data packet that needs to be stored. The data is then written from the MDR to the address specified in the MAR.

評分準則

Award up to 3.125 marks: [1 mark] for identifying the role of the MAR (holds the destination address). [1 mark] for identifying the role of the MDR (holds the data to be written). [1.125 marks] for explaining the coordinated action (data is written from the MDR directly to the location pointed to by the MAR).
題目 5 · Short Answer
3.125
Explain how packet loss is identified and resolved during transmission over a network using the Transmission Control Protocol (TCP).
查看答案詳解

解題

TCP is a reliable, connection-oriented protocol that ensures all packets arrive. It achieves this by requiring the receiver to return an acknowledgement (ACK) for each packet based on its sequence number. If the sender does not receive an ACK for a packet within a preset timeout limit, or if it receives multiple duplicate ACKs for previous packets, it assumes the packet was lost and automatically retransmits it.

評分準則

Award up to 3.125 marks: [1 mark] for explaining how packet loss is detected (using sequence numbers and lack of acknowledgements or receiving duplicate ACKs). [1 mark] for mentioning the timeout mechanism. [1.125 marks] for describing the resolution (automatic retransmission of the unacknowledged packet by the sender).
題目 6 · Short Answer
3.125
Outline how tunneling and encryption work together to protect data transmission within a Virtual Private Network (VPN).
查看答案詳解

解題

A VPN relies on both tunneling and encryption to secure data. Tunneling encapsulates the original private IP packet inside an outer carrier packet, creating a logical private path over a public infrastructure. Encryption scrambles the data payload within this tunnel. Even if a third party intercepts the packets on the public network, they cannot read the encrypted content, ensuring data confidentiality and integrity.

評分準則

Award up to 3.125 marks: [1 mark] for explaining tunneling (encapsulation of private packets to route them securely). [1 mark] for explaining encryption (encoding the data payload to make it unreadable). [1.125 marks] for explaining how they cooperate to provide both routing anonymity and content security.
題目 7 · Short Answer
3.125
Explain the concept of 'abstraction' in high-level programming languages and outline how it assists a software programmer.
查看答案詳解

解題

Abstraction involves hiding complex details and showing only the essential features. In high-level programming languages, details of the physical hardware—such as register management, memory allocation, and specific machine code instructions—are hidden. The programmer is provided with abstract constructs such as variables, functions, and objects. This assists the programmer by reducing cognitive load, minimizing coding errors, and speeding up development.

評分準則

Award up to 3.125 marks: [1 mark] for defining abstraction as hiding low-level technical complexity (e.g., machine code, register usage). [1 mark] for explaining the high-level representation (variables, functions). [1.125 marks] for outlining how it assists the programmer (reduced complexity, faster development, portable code).
題目 8 · Short Answer
3.125
Distinguish between open-loop and closed-loop control systems, providing a distinct real-world example of each.
查看答案詳解

解題

An open-loop control system performs its actions based strictly on pre-programmed inputs or timers without receiving any feedback about the actual output. For example, a microwave oven heating food for a set period is open-loop. A closed-loop control system constantly monitors its output using sensors and uses this feedback to make adjustments to achieve a target state. For example, an air conditioning unit with a thermostat continuously measures ambient temperature and adjusts cooling to maintain a set temperature.

評分準則

Award up to 3.125 marks: [1 mark] for distinguishing open-loop (no feedback, timer/preset-based) and providing a correct example. [1 mark] for distinguishing closed-loop (uses sensor feedback to make adjustments) and providing a correct example. [1.125 marks] for clearly explaining how feedback allows closed-loop systems to handle unpredictable external changes, unlike open-loop systems.

卷一 乙部

Answer all questions. Composed of larger scenario-based questions with structured subdivisions and logic problems.
5 題目 · 75
題目 1 · Structured
15
A regional hospital is migrating from a legacy paper-based record system to a modern centralized cloud-based Electronic Health Record (EHR) database.

(a) Identify two stakeholders that should be consulted to determine the system requirements, and justify why their input is necessary. [4]

(b) Compare two methods of data migration testing that the IT team must perform to ensure the paper records are accurately digitized and stored. [4]

(c) Discuss the advantages and disadvantages of using a phased implementation (phased introduction) compared to a direct changeover for this medical migration. [4]

(d) Explain one role that user documentation plays in reducing implementation risks for the medical staff. [3]
查看答案詳解

解題

(a)
1. Medical Staff (Doctors and Nurses): Necessary to consult because they are the primary end-users who input and retrieve clinical data. Their input ensures the user interface fits clinical workflows and doesn't impede critical care.
2. Administrative/Billing Staff: Necessary because they handle patient registration, insurance, and billing. Their input ensures the administrative modules capture required compliance and financial data.
(Other valid stakeholders: IT support staff, patients, compliance/legal officers).

(b)
1. Validation Testing (Data Cleansing/Verification): Involves checking if digitized values match the physical source documents (e.g., verifying database records against a sample of paper charts to ensure accuracy and schema conformity).
2. Volume/Load Testing: Involves testing how the new system handles migrating a massive volume of historical data at once to ensure the cloud system doesn't crash or suffer data corruption under high load.
Comparison: Validation testing focuses on qualitative accuracy and data integrity of individual records, whereas volume testing focuses on quantitative performance and reliability of the migration pipeline under high stress.

(c)
Phased Implementation:
- Advantage: Low risk. One department (e.g., pediatrics) migrates first. If a bug occurs, it is isolated and does not affect the whole hospital.
- Disadvantage: Complexity of managing two co-existing systems (paper for some departments, digital for others) and synchronization challenges.
Direct Changeover:
- Advantage: Instant transition, lower operating costs as only one system is maintained, and zero synchronization overhead.
- Disadvantage: Extremely high risk. If the system fails on day one, patient records are inaccessible, potentially endangering lives.

(d)
User documentation acts as an immediate training reference tool. In high-stress clinical environments, medical staff must be able to resolve system navigation issues without waiting for IT support. Clear documentation (e.g., quick-reference guides) reduces user anxiety, prevents input errors that could corrupt patient histories, and ensures smooth business continuity.

評分準則

(a) Award up to [4] marks:
Award [1] for identifying a valid stakeholder and [1] for a valid justification, up to two stakeholders.
- Medical staff [1] to ensure clinical usability/workflow integration [1].
- Administrative staff [1] to ensure administrative/billing compliance [1].
- IT Department [1] to establish hardware/network compatibility [1].

(b) Award up to [4] marks:
Award [1] for describing the first testing method.
Award [1] for describing the second testing method.
Award up to [2] marks for a clear comparison of their objectives/outcomes.
- Method 1: Data validation/accuracy testing (verifying that field types, names, and medical details migrated correctly) [1].
- Method 2: System performance/volume testing (testing how the database loads under full-scale migrated capacity) [1].
- Comparison: Validation ensures "correctness" of data, whereas volume testing ensures the "stability" and "scalability" of the database structure under load [2].

(c) Award up to [4] marks:
Award [1] for an advantage of phased implementation.
Award [1] for a disadvantage of phased implementation.
Award [1] for an advantage of direct changeover.
Award [1] for a disadvantage of direct changeover.
Note: Accept points discussing risk mitigation, operational costs, or system synchronization.

(d) Award up to [3] marks:
Award [1] for stating a risk (e.g., user error, slow operations).
Award [1] for explaining how documentation mitigates this risk (e.g., clear step-by-step procedures prevent data entry errors).
Award [1] for linking this directly to the scenario (e.g., critical medical environments cannot afford downtime or wrong drug dosages due to UI confusion).
題目 2 · Structured
15
A multi-national logistics company relies on a secure network to track packages globally. Remote employees access the central database via a Virtual Private Network (VPN).

(a) Explain how data encryption and tunneling are used in a Virtual Private Network (VPN) to ensure secure data transmission over the public Internet. [4]

(b) Outline how packet switching is used to transmit tracking data from a local warehouse router to the central server. [4]

(c) Describe the role of the Transmission Control Protocol (TCP) and Internet Protocol (IP) in ensuring reliable packet delivery. [4]

(d) Identify three physical or operational factors that can affect the transmission speed (bandwidth/throughput) across this network. [3]
查看答案詳解

解題

(a)
- Tunneling: Encapsulates the original tracking data packet within another transit packet. This hides the original IP addresses and payload, creating a private logical path over public network routers.
- Encryption: Encrypts the payload of the packet using cryptographic keys (e.g., IPsec). If the packet is intercepted by unauthorized parties on the public internet, it appears as unreadable ciphertext, ensuring confidentiality.

(b)
- The tracking data is split into smaller units called packets at the source router.
- Each packet is appended with a header containing the source/destination IP addresses and a sequence number.
- Packets are sent independently through the network. Routers dynamically choose the optimal path for each packet based on current network congestion.
- Once all packets arrive at the destination, they are reassembled into the original file using their sequence numbers.

(c)
- IP (Internet Protocol): Responsible for logical addressing and routing. It formats packets and directs them from hop to hop across networks to the final destination IP address.
- TCP (Transmission Control Protocol): Establishes a connection (handshake) and ensures reliability. It numbers the packets, performs error-checking (checksums), detects missing packets, sends acknowledgement signals (ACK), and requests retransmission (ARQ) for any dropped packets.

(d)
- Transmission media type (e.g., fiber optic cables vs. copper wire vs. wireless).
- Network congestion / volume of concurrent traffic.
- Physical distance between the local warehouse and the central server (causing latency).
- Hardware limitations of intermediate devices (e.g., outdated routers or switches).

評分準則

(a) Award up to [4] marks:
Award up to [2] marks for explaining tunneling (encapsulation of packets [1], masking original headers/IPs [1]).
Award up to [2] marks for explaining encryption (scrambling data using keys [1], rendering intercepted data unreadable/maintaining confidentiality [1]).

(b) Award up to [4] marks:
Award [1] for splitting data into packets.
Award [1] for adding headers containing source/destination addresses and sequence numbers.
Award [1] for packets traveling independently via different paths through intermediate routers.
Award [1] for reassembling packets in order at the destination using sequence numbers.

(c) Award up to [4] marks:
Award up to [2] marks for the role of IP (addressing packets [1], routing them across nodes [1]).
Award up to [2] marks for the role of TCP (establishing connection [1], managing sequence numbering/error detection/retransmissions [1]).

(d) Award up to [3] marks:
Award [1] for each valid factor identified, up to [3].
- Type of transmission media [1].
- Amount of traffic/congestion [1].
- Physical distance/number of hops [1].
- Performance/bandwidth limitations of routers/modems [1].
題目 3 · Structured
15
A text editor manages Undo and Redo operations using two stacks: `undoStack` and `redoStack`. Both stacks have a standard dynamic implementation supporting operations: `.isEmpty()`, `.push(item)`, and `.pop()`.

(a) Describe how a stack operates as a Last-In, First-Out (LIFO) data structure. [2]

(b) A user performs the following sequential actions in the editor:
1. Insert "A"
2. Insert "B"
3. Click Undo
4. Insert "C"
5. Click Undo
6. Click Redo

Assume that:
- "Insert [item]" pushes the action onto `undoStack` and clears `redoStack`.
- "Undo" pops an action from `undoStack` and pushes it onto `redoStack`.
- "Redo" pops an action from `redoStack` and pushes it onto `undoStack`.

Construct a trace table showing the state of both stacks after each of these 6 steps (with the top of the stack clearly indicated). [5]

(c) Write an algorithm in pseudocode for the `redoAction()` method, which performs the Redo operation. The method must check if the redo stack is empty before performing operations to prevent runtime errors. [4]

(d) Contrast a dynamic linked list implementation of a stack with a static array implementation in terms of memory usage and runtime performance. [4]
查看答案詳解

解題

(a) A stack is a linear data structure where elements are added and removed from the same end, called the "top". Under LIFO, the element that was most recently added (Last-In) is the first one to be retrieved and removed (First-Out) when a pop operation is called.

(b) Trace Table:
Note: We will represent the stacks as lists where the rightmost item is the top of the stack.

Step | Action | `undoStack` (top on right) | `redoStack` (top on right)
0. Initial State | [] | []
1. Insert "A" | ["A"] | []
2. Insert "B" | ["A", "B"] | []
3. Click Undo | ["A"] | ["B"]
4. Insert "C" | ["A", "C"] | [] (cleared)
5. Click Undo | ["A"] | ["C"]
6. Click Redo | ["A", "C"] | []

(c)
```
method redoAction()
if not redoStack.isEmpty() then
action = redoStack.pop()
undoStack.push(action)
else
output "No actions to redo."
end if
end method
```

(d)
- Memory Usage: A static array pre-allocates a fixed block of memory, which can lead to wasted memory if the stack is mostly empty, or cause a stack overflow error if it exceeds the limit. A dynamic linked list allocates memory dynamically for each node as it is pushed, which prevents overflow, but requires extra memory per node to store pointer/reference fields.
- Runtime Performance: Pushing/popping in a static array is highly efficient (constant time, \(O(1)\)) because it only updates an index pointer. In a dynamic linked list, pushing/popping is also conceptually \(O(1)\), but involves the overhead of dynamic memory allocation and pointer updates on the heap, which can be slightly slower in practice.

評分準則

(a) Award up to [2] marks:
Award [1] for defining the dynamic/single-ended access point (the top).
Award [1] for explaining that the last added item is the first to be popped.

(b) Award up to [5] marks:
Award [1] for correct state after Step 1 and 2.
Award [1] for correct state after Step 3 (moving "B").
Award [1] for correct state after Step 4 (clearing `redoStack` and pushing "C").
Award [1] for correct state after Step 5.
Award [1] for correct final state after Step 6.

(c) Award up to [4] marks:
Award [1] for checking if `redoStack` is empty (using `.isEmpty()` or equivalent).
Award [1] for popping the correct element from `redoStack`.
Award [1] for pushing the popped element onto `undoStack`.
Award [1] for correct pseudocode structure (conditional if/else, indentation, or clear blocks).

(d) Award up to [4] marks:
Award up to [2] marks for memory comparison:
- Array has fixed size/potential waste or overflow [1].
- Linked list is dynamic, avoids overflow, but has pointer overhead [1].
Award up to [2] marks for performance comparison:
- Both have \(O(1)\) time complexity for push/pop [1].
- Linked list has system overhead due to heap allocation/deallocation [1].
題目 4 · Structured
15
An automated agricultural drone takes temperature readings across an \(N \times N\) grid of a crop field, represented by a 2D array `gridTemp` where indices range from \(0\) to \(N-1\). The drone must identify "heat hotspots" where the temperature is strictly above a threshold temperature \(T\), and strictly greater than all of its existing adjacent neighbors (up, down, left, right).

(a) Explain the difference between a bubble sort and a selection sort algorithm in terms of their worst-case time complexity and the number of swaps they execute. [4]

(b) Construct an algorithm in pseudocode that traverses a 2D array `gridTemp` of size \(N \times N\) (where \(N\) and \(T\) are pre-defined global constants) and outputs the 2D coordinates `(row, col)` of all identified "heat hotspots". Ensure boundary conditions are handled so that adjacent cells outside the grid are not checked. [7]

(c) Evaluate the efficiency of your algorithm in part (b) using Big-O notation, and justify your answer based on the design of your loops. [4]
查看答案詳解

解題

(a)
- Time Complexity: Both bubble sort and selection sort have a worst-case time complexity of \(O(N^2)\).
- Swaps: Bubble sort performs adjacent swaps repeatedly throughout its nested loops, leading to a worst-case swap count of \(O(N^2)\). Selection sort only performs a maximum of one swap per outer loop iteration, leading to a worst-case swap count of \(O(N)\). Therefore, selection sort typically performs significantly fewer swaps.

(b)
```
method findHotspots(gridTemp, N, T)
loop r from 0 to N - 1
loop c from 0 to N - 1
if gridTemp[r][c] > T then
isHotspot = true

// Check Up neighbor
if r > 0 then
if gridTemp[r][c] <= gridTemp[r - 1][c] then
isHotspot = false
end if
end if

// Check Down neighbor
if r < N - 1 then
if gridTemp[r][c] <= gridTemp[r + 1][c] then
isHotspot = false
end if
end if

// Check Left neighbor
if c > 0 then
if gridTemp[r][c] <= gridTemp[r][c - 1] then
isHotspot = false
end if
end if

// Check Right neighbor
if c < N - 1 then
if gridTemp[r][c] <= gridTemp[r][c + 1] then
isHotspot = false
end if
end if

if isHotspot == true then
output "Hotspot found at: ", r, ", ", c
end if
end if
end loop
end loop
end method
```

(c)
- The time complexity is \(O(N^2)\).
- Justification: The algorithm utilizes two nested loops, each iterating \(N\) times from \(0\) to \(N-1\). This means the outer loop runs \(N\) times, and for every outer loop iteration, the inner loop runs \(N\) times, leading to exactly \(N \times N = N^2\) iterations. Inside the inner loop, all conditional operations and neighbor checks take constant time, \(O(1)\), because there are at most 4 neighbors to check regardless of the size of \(N\). Thus, the growth rate is dominated by the \(N^2\) comparisons, yielding \(O(N^2)\).

評分準則

(a) Award up to [4] marks:
Award [1] for stating the worst-case time complexity of bubble sort (\(O(N^2)\)).
Award [1] for stating the worst-case time complexity of selection sort (\(O(N^2)\)).
Award [1] for explaining bubble sort swaps (adjacent swaps, up to \(O(N^2)\)).
Award [1] for explaining selection sort swaps (at most \(O(N)\) swaps / 1 swap per pass).

(b) Award up to [7] marks:
Award [1] for correct nested loops to traverse the 2D array.
Award [1] for checking if the current element is greater than threshold \(T\).
Award [1] for correctly checking boundaries when looking Up (i.e. `r > 0`).
Award [1] for correctly checking boundaries when looking Down (i.e. `r < N - 1`).
Award [1] for correctly checking boundaries when looking Left and Right (i.e. `c > 0` and `c < N - 1`).
Award [1] for comparing the current value and correctly flagging if it is not a hotspot (e.g. using a boolean flag set to false if any neighbor is greater than or equal).
Award [1] for outputting the correct indices `(r, c)` only if it remains flagged as a hotspot.

(c) Award up to [4] marks:
Award [1] for stating the correct complexity of \(O(N^2)\).
Award [1] for explaining the outer loop running \(N\) times and inner loop running \(N\) times.
Award [1] for stating that the checks inside the loop take constant time / \(O(1)\) time.
Award [1] for concluding that the overall growth rate depends on visiting each of the \(N^2\) elements exactly once.
題目 5 · Structured
15
An automated ventilation and cooling system in an underground subway station is designed to maintain a safe air quality index (AQI) and temperature.

(a) State the role of sensors, processors, and actuators within this automated system. [3]

(b) Explain how a closed-loop feedback system is used to dynamically regulate the carbon dioxide (\(CO_2\)) levels in the station. [4]

(c) Discuss the technical necessity of utilizing both an Analog-to-Digital Converter (ADC) and a Digital-to-Analog Converter (DAC) in this control system. [4]

(d) Outline two safety-critical or ethical considerations that developers must address when writing the control software for this public system. [4]
查看答案詳解

解題

(a)
- Sensors: Continuously measure physical/environmental conditions (e.g. gas concentrations, air temperature) and convert them into electrical signals.
- Processors: Receive digitized data, compare values against preset safe thresholds using control algorithms, and send commands to output components.
- Actuators: Convert electrical signals from the processor into physical action (e.g., turning on mechanical exhaust fans or opening physical airflow vents).

(b)
In a closed-loop feedback system, the output of the system is continuously monitored to influence the subsequent inputs:
1. The system reads the actual \(CO_2\) concentration via sensors.
2. The processor compares this reading to a target baseline level (setpoint).
3. If the level is too high, the processor calculates the error and sends a signal to run the ventilation fans (actuators).
4. Running the fans lowers the \(CO_2\) level. The sensor immediately measures the updated, lower \(CO_2\) level and feeds it back to the processor, which adjusts the fans accordingly to avoid over-ventilation.

(c)
- ADC (Analog-to-Digital Converter): Physical variables like temperature and gas concentration are continuous analog signals. Computers/microprocessors can only process discrete digital binary values. An ADC is necessary to convert the analog sensor voltage into digital code for the processor to analyze.
- DAC (Digital-to-Analog Converter): The processor operates digitally, but certain actuators, such as variable-speed electric fan motors, require continuous analog voltage ranges to adjust speed smoothly rather than just switching on/off. A DAC is necessary to translate digital commands back into variable analog control voltages.

(d)
1. Fail-Safe Defaults: If a hardware failure, power loss, or software crash occurs, the system must default to a safe state (e.g., locking all ventilation dampers in the open position to allow natural airflow and prevent suffocation).
2. Sensor Redundancy and Error Detection: The system must use multiple redundant sensors and vote-logic. If a single sensor gets clogged or reports corrupt values, the software must detect the anomaly, ignore the faulty reading, and alert operators rather than shutting off ventilation based on false safety metrics.

評分準則

(a) Award up to [3] marks:
Award [1] for defining the role of sensors (monitoring/input of physical metrics).
Award [1] for defining the role of processors (comparing data against thresholds / logical decision making).
Award [1] for defining the role of actuators (converting instructions to physical action).

(b) Award up to [4] marks:
Award [1] for explaining that the output (air quality) is used as feedback.
Award [1] for referencing continuous cycle of sampling.
Award [1] for comparing the reading against a predefined threshold (setpoint).
Award [1] for adjusting the actuator output based on this error to return the system to equilibrium.

(c) Award up to [4] marks:
Award [1] for explaining that sensors produce analog signals.
Award [1] for explaining that ADCs allow processors to interpret these analog signals as binary data [1].
Award [1] for explaining that some actuators require continuous analog voltage to scale operation (e.g., fan speeds) [1].
Award [1] for stating that DACs convert digital control signals back to analog levels to control these devices [1].

(d) Award up to [4] marks:
Award up to [2] marks for the first consideration (e.g., Fail-safe defaults):
- Identifying the risk of software crash/power loss [1] and explaining the fail-safe action (e.g., emergency backup fans/vents opening) [1].
Award up to [2] marks for the second consideration (e.g., Sensor redundancy/calibration):
- Identifying risk of false sensor data [1] and explaining the software solution (e.g., cross-referencing multiple sensors to prevent single-point-of-failure) [1].

卷二 Option D

Answer all questions from the OOP option. Targets object structures, code modification, UML modeling, and data structure integration.
4 題目 · 65
題目 1 · Programmatic OOP Tasks
16.25
A warehouse inventory management system is built using an Object-Oriented design. An abstract class Item represents a generic product with these attributes:
- id (String, private)
- name (String, private)
- price (double, private)
- quantity (int, protected)

A subclass PerishableItem inherits from Item and adds:
- expiryDays (int, private)
- A method needsImmediateSale() which returns true if expiryDays is less than 3 and quantity is greater than 0.

An Inventory class maintains an array of Item objects:
- Item[] items
- int count (actual number of items stored)

Tasks:
1. Draw a UML class diagram showing the relationships, attributes, and methods of Item, PerishableItem, and Inventory. [4 marks]
2. Write the Java or pseudocode class implementation for PerishableItem, including its constructor, superclass call, and the needsImmediateSale() method. [4.25 marks]
3. Write the implementation for a method listUrgentItems() in the Inventory class that iterates through the items array and prints the ID and name of all PerishableItems that need immediate sale. Use safe casting where appropriate. [4 marks]
4. Explain how inheritance and polymorphism reduce code redundancy in this inventory system when calculating the total value of all stock in the warehouse. [4 marks]
查看答案詳解

解題

Part 1 (UML Class Diagram):
- Inventory: has attribute items of type Item[] and count of type int. Link to Item is an Aggregation (hollow diamond at Inventory end).
- Item (Abstract): attributes id (private), name (private), price (private), quantity (protected). Methods: getters and setters.
- PerishableItem: attributes expiryDays (private). Method: needsImmediateSale(). Link to Item is Generalization (hollow arrow pointing to Item).

Part 2 (Class Implementation):
- The class must specify 'extends Item'.
- Constructor must use super() and pass id, name, price, and quantity.
- expiryDays must be assigned properly.
- needsImmediateSale() must check both expiryDays < 3 and quantity > 0.

Part 3 (listUrgentItems):
- Loop must go from 0 up to count - 1 to avoid NullPointerException.
- instanceof check is required to verify if the general Item reference is a PerishableItem.
- Casting to PerishableItem is required to invoke needsImmediateSale().
- Output prints the id and name (assuming standard getters are available).

Part 4 (Inheritance and Polymorphism benefits):
- Code Reuse: common fields (id, name, price) and actions are written once in the superclass.
- Extensibility & Flexibility: We can loop through all Item objects in the array and polymorphically get their total stock value (e.g., items[i].getValue()) even if different subclasses calculate value differently (e.g., discounted value for perishable items).

評分準則

Total Marks: 16.25
- Part 1 (UML): 4 marks
* 1 mark: Correct aggregation line and notation from Inventory to Item.
* 1 mark: Correct generalization/inheritance arrow from PerishableItem to Item.
* 1 mark: Correct visibility markings (- for private, # for protected, + for public).
* 1 mark: Correct attributes and methods listed in class boxes.
- Part 2 (Implementation): 4.25 marks
* 1 mark: Correct header 'public class PerishableItem extends Item'.
* 1 mark: Correct constructor using 'super(id, name, price, quantity)'.
* 1 mark: Proper assignment 'this.expiryDays = expiryDays;'.
* 1.25 marks: Logical expression for 'needsImmediateSale()' checking both conditions correctly.
- Part 3 (Iteration and casting): 4 marks
* 1 mark: Correct loop bounds iterating up to 'count'.
* 1 mark: Correct use of 'instanceof' to safely filter PerishableItem objects.
* 1 mark: Correct class casting and method invocation.
* 1 mark: printing ID and name output.
- Part 4 (Explanation): 4 marks
* 2 marks: Explanation of inheritance reducing duplication of attributes/getters.
* 2 marks: Explanation of polymorphism allowing unified processing of different objects in a single array loop.
題目 2 · Programmatic OOP Tasks
16.25
A smart home automation system manages multiple IoT devices.
A base class SmartDevice is defined with the following attributes:
- deviceId (String, private)
- room (String, private)
- isOn (boolean, private)
It includes a constructor, getter methods, and a method togglePower() which switches isOn from true to false or vice versa.

A subclass SmartThermostat extends SmartDevice and adds:
- currentTemp (double, private)
- targetTemp (double, private)
- A method adjustTemperature(double change) which increases or decreases currentTemp by change, and prints a warning \"WARNING: Overheating risk!\" if currentTemp exceeds 30.0 degrees Celsius.

A HomeHub class manages a collection of SmartDevice objects using a dynamic ArrayList named deviceList.

Tasks:
1. Construct the complete class definition for SmartThermostat in Java or standard pseudocode, including its constructor (which accepts values for deviceId, room, currentTemp, and targetTemp, and initializes isOn to false), and the adjustTemperature(double change) method. [4.25 marks]
2. Write a method powerOffAllInRoom(String targetRoom) in the HomeHub class that iterates through deviceList and turns off (sets isOn to false) every device located in targetRoom. Use appropriate getter/setter methods. [4 marks]
3. Draw a UML class diagram displaying the relationships between SmartDevice, SmartThermostat, and HomeHub with proper notation. [4 marks]
4. Compare the use of an ArrayList versus a standard fixed-size array (SmartDevice[]) for storing devices in the HomeHub class. Discuss specifically in terms of dynamic resizing and memory utilization. [4 marks]
查看答案詳解

解題

Part 1:
- Class declared as extending SmartDevice.
- Constructor calls super(deviceId, room) to initialize inherited private fields. Note that isOn is false by default (initialized by the parent constructor or implicitly).
- Instance variables currentTemp and targetTemp are set using parameters.
- Method adjustTemperature(double change) adds change to currentTemp, then performs the threshold check (> 30.0) and prints the warning.

Part 2:
- Iterate through ArrayList using a for-each loop or index-based loop.
- Retrieve room name using getRoom() and compare with targetRoom using .equals().
- Check if device is currently on. If yes, invoke togglePower() (since togglePower switches isOn from true to false).

Part 3:
- HomeHub -> SmartDevice: Aggregation (1 to * cardinality).
- SmartThermostat -> SmartDevice: Generalization.
- Attribute and method visibility denoted (+ for public, - for private).

Part 4:
- Dynamic resizing: ArrayList hides complexity of array management, resizing automatically during add/remove operations.
- Memory footprint: Fixed arrays have zero overhead per reference but are static. ArrayList has structural overhead and reallocates capacity incrementally, which may lead to unused reserved memory.

評分準則

Total Marks: 16.25
- Part 1 (SmartThermostat): 4.25 marks
* 1 mark: Correct inheritance syntax and variable declarations.
* 1 mark: Correct super() call in constructor.
* 1 mark: Proper setting of currentTemp and targetTemp.
* 1.25 marks: adjustTemperature correctly updating temperature and executing safety conditional warning print.
- Part 2 (powerOffAllInRoom): 4 marks
* 1 mark: Correct loop through ArrayList.
* 1 mark: String comparison using .equals() instead of ==.
* 1 mark: Correctly checking device status using getIsOn().
* 1 mark: Invoking togglePower() to shut down active devices.
- Part 3 (UML Diagram): 4 marks
* 1 mark: Correct representation of aggregation (hollow diamond on HomeHub end).
* 1 mark: Correct representation of inheritance (hollow triangle pointing to SmartDevice).
* 1 mark: Correct representation of attributes and visibility (- private, + public).
* 1 mark: Inclusion of correct methods in classes.
- Part 4 (Comparison): 4 marks
* 2 marks: Clear description of dynamic resizing and standard array limitations.
* 2 marks: Detailed comparison of memory footprint and efficiency tradeoffs.
題目 3 · Programmatic OOP Tasks
16.25
An educational library uses a custom Singly Linked List to catalog books.
Each node in the list is represented by the class BookNode:
- title (String, private)
- isbn (String, private)
- next (BookNode, private)

A LibraryCatalog class manages these nodes:
- head (BookNode, private)

Tasks:
1. Write the Java or standard pseudocode class definition for BookNode, including a constructor that initializes title and isbn, and accessor/mutator methods for the next reference. [4 marks]
2. Write a method insertSorted(BookNode newNode) in the LibraryCatalog class that inserts a new book alphabetically by its title (ignoring case). Ensure the linked list order is maintained and corner cases (like empty list or insertion at the head) are correctly handled. [5.25 marks]
3. Explain why the next attribute within BookNode is considered a self-referential structure, and discuss its memory advantages over using a standard fixed-size array of objects. [4 marks]
4. State the definition of data encapsulation and explain how it is enforced in the design of the BookNode class. [3 marks]
查看答案詳解

解題

Part 1:
- Class definition requires private fields title, isbn, next.
- Constructor sets title and isbn; sets next to null.
- Getters and setters must be provided for next. Getters are also provided for title and isbn to support sorting.

Part 2:
- Case 1: Empty list (head is null) or new node should go first because its title alphabetically comes before head's title. In this case, newNode.setNext(head) and head = newNode.
- Case 2: Traversing the list to find the insertion point. We look ahead using current.getNext() to compare titles. If current.getNext()'s title is lexicographically smaller than newNode's title, we advance.
- Link newNode into position: newNode.setNext(current.getNext()) followed by current.setNext(newNode).

Part 3:
- Self-referential: BookNode class defines a member variable 'next' of type BookNode. It references an object of the same class template.
- Memory Advantage: In a fixed array, allocating size 1000 for 10 books wastes 99% of memory. Linked lists dynamically scale, allocating heap memory only when a new node is constructed.

Part 4:
- Encapsulation definition: Bundling data and methods together, hiding the state, and controlling modifications.
- Application: Private variables cannot be corrupted directly from the outside; only setNext() can change the linkage, preserving data integrity.

評分準則

Total Marks: 16.25
- Part 1 (BookNode Class): 4 marks
* 1 mark: Correct private attributes declared.
* 1 mark: Constructor initializing fields.
* 1 mark: getNext() and setNext(BookNode next) implemented correctly.
* 1 mark: Accessors for title and isbn.
- Part 2 (insertSorted): 5.25 marks
* 1 mark: Correct handling of the empty list / head insertion condition.
* 1.25 marks: Correct use of compareToIgnoreCase() to evaluate alphabetical precedence.
* 1.5 marks: Correct loop condition checking current.getNext() != null.
* 1.5 marks: Correct reference re-linking (newNode.setNext(current.getNext()) and current.setNext(newNode)).
- Part 3 (Self-referential / Memory): 4 marks
* 2 marks: Clear definition of self-referential structures with examples.
* 2 marks: Clear comparison of runtime memory allocations and lack of fixed boundaries.
- Part 4 (Encapsulation): 3 marks
* 1.5 marks: Correct definition of encapsulation.
* 1.5 marks: Demonstration of enforcement through private visibility modifiers and public getters/setters in the BookNode class.
題目 4 · Programmatic OOP Tasks
16.25
An online learning management platform tracks user enrollments and course performance.
An interface is defined as follows:
```java
public interface Assessable {
double calculateFinalGrade();
}
```

A base class Enrollment implements Assessable and contains:
- studentId (String, private)
- courseCode (String, private)
- scores (double[], private - representing individual assignment scores)
- examScore (double, private)

The standard calculateFinalGrade() method for Enrollment calculates the average of the scores array (representing 40% of the grade) and adds the examScore (representing 60% of the grade).

A subclass PremiumEnrollment extends Enrollment and adds:
- projectScore (double, private)

In PremiumEnrollment, the calculateFinalGrade() method is overridden: assignments (scores) represent 30%, the final exam represents 50%, and the projectScore represents 20% of the overall grade.

Tasks:
1. Write the Java or standard pseudocode implementation for the PremiumEnrollment class. Include its constructor, which must initialize both base class and subclass fields, and the overridden calculateFinalGrade() method. Assume appropriate helper/getter methods are available in the base class for scores and examScore. [5.25 marks]
2. Draw a UML class diagram demonstrating the relationship between the Assessable interface, the Enrollment class, and the PremiumEnrollment class. [3 marks]
3. Write a method getAverageGrade(Enrollment[] activeEnrollments) in a separate driver class that calculates and returns the average grade of all enrollments in the array using polymorphism. [4 marks]
4. Discuss the concept of abstract classes versus interfaces. Explain why Assessable is better designed as an interface rather than an abstract class in this system. [4 marks]
查看答案詳解

解題

Part 1:
- Declare PremiumEnrollment as extending Enrollment.
- Call super(...) in the constructor to pass studentId, courseCode, scores, and examScore.
- Initialize projectScore.
- Overriding calculateFinalGrade() involves fetching the scores array, calculating its mean, and applying the weightages (30% assignmentAvg, 50% examScore, 20% projectScore).

Part 2:
- Interface: Assessable (denoted with <>).
- Realization: Enrollment ----|> Assessable (dashed line, hollow arrow).
- Inheritance: PremiumEnrollment —-|> Enrollment (solid line, hollow arrow).

Part 3:
- Loop over Enrollment[] array.
- Call the polymorphic method e.calculateFinalGrade(). At runtime, Java resolves this to the specific implementation (Enrollment or PremiumEnrollment).
- Sum the grades and return the average.

Part 4:
- Abstract Class vs Interface: Abstract class represents high conceptual identity (IS-A) and shares common state/code. Interface represents capability/behavioral agreement (CAN-DO).
- Justification: Not everything that is assessable is an enrollment. An interface allows multiple inheritance of behaviors and ensures flexible integration across unrelated subsystems.

評分準則

Total Marks: 16.25
- Part 1 (PremiumEnrollment Class): 5.25 marks
* 1 mark: Correct class declaration with extends keyword.
* 1 mark: Constructor utilizing super() with correct parameters.
* 1 mark: Correct initialization of projectScore.
* 1.25 marks: Calculation of assignment scores average.
* 1 mark: Correct calculation of final grade with 30%/50%/20% weightings.
- Part 2 (UML): 3 marks
* 1 mark: Correct dashed-arrow realization link from Enrollment to Assessable interface.
* 1 mark: Correct solid-arrow inheritance link from PremiumEnrollment to Enrollment.
* 1 mark: Correct labeling of interface and classes.
- Part 3 (Polymorphic Method): 4 marks
* 1 mark: Correct signature returning double and accepting Enrollment[].
* 1 mark: Safe check for null or division by zero.
* 1 mark: Loop calling e.calculateFinalGrade() polymorphically.
* 1 mark: Accurate sum division and returning the average.
- Part 4 (Discussion): 4 marks
* 2 marks: Clear differentiation between abstract classes and interfaces (state vs contract).
* 2 marks: Accurate justification for using an interface to promote high cohesive design without restrictive inheritance.

Paper 3 Case Study

Answer all questions in relation to the annual case study document. Structured around high-level machine learning and chatbot operations.
7 題目 · 42
題目 1 · short-answer
2
Outline the role of tokenization in the preprocessing phase of a Large Language Model (LLM).
查看答案詳解

解題

Tokenization serves as the bridge between raw human language and numerical computation. In the preprocessing phase: First, raw text is segmented into smaller linguistic units called tokens (which can be whole words, characters, or sub-words like wordpieces). Second, these tokens are mapped to specific integers from a predefined vocabulary, which are then used to look up vector embeddings. This allows the neural network to perform mathematical operations on the input text.

評分準則

Award [1 mark] for stating that tokenization segments or splits raw input text into smaller units (such as tokens, sub-words, or words). Award [1 mark] for explaining that these tokens are converted or mapped into numerical values (such as IDs or embeddings) that the neural network can mathematically process.
題目 2 · short-answer
2
Outline how Retrieval-Augmented Generation (RAG) improves the accuracy of responses in a domain-specific chatbot.
查看答案詳解

解題

RAG works by combining information retrieval with text generation. When a user submits a query: First, the system searches a vector database or external knowledge base to find relevant documents or facts. Second, the retrieved documents are appended to the user's prompt as additional context. The LLM then uses this context to generate a highly accurate, domain-specific response, significantly reducing hallucinations and the need for expensive fine-tuning.

評分準則

Award [1 mark] for describing the retrieval step, such as querying or fetching relevant data or documents from an external knowledge base or vector database based on the user's prompt. Award [1 mark] for explaining how combining this retrieved context with the prompt allows the LLM to generate a response grounded in factual, domain-specific, or up-to-date information, thereby reducing hallucinations.
題目 3 · Structured Process Analysis
4
Explain the sequential process of Retrieval-Augmented Generation (RAG) from the moment a user submits a query to an enterprise chatbot, focusing on how external data is integrated to generate an accurate response.
查看答案詳解

解題

1. Query Vectorization: The user's input query is converted into a vector representation (embedding) using an embedding model. 2. Retrieval: The system performs a similarity search (such as cosine similarity) in a vector database containing pre-embedded enterprise documents to retrieve the top-k most relevant chunks. 3. Prompt Augmentation: The retrieved text chunks are combined with the original user query and system instructions into an augmented prompt. 4. Generation: This augmented prompt is fed to the LLM, which synthesizes the final context-grounded response, reducing hallucination.

評分準則

Award up to 4 marks as follows: [1 mark] for explaining query vectorization using an embedding model. [1 mark] for describing the similarity search/retrieval of relevant document chunks from a vector database. [1 mark] for explaining how the retrieved chunks and original query are integrated into an augmented prompt. [1 mark] for explaining how the LLM uses this context to generate a grounded, accurate output.
題目 4 · Structured Process Analysis
4
In the context of aligning LLM behavior with human preferences, explain the step-by-step pipeline of Reinforcement Learning from Human Feedback (RLHF), specifically outlining the progression from human evaluation to model policy optimization.
查看答案詳解

解題

1. Human Preference Collection: A prompt dataset is used to generate multiple outputs from a pre-trained model, which human evaluators rank based on quality, alignment, and safety. 2. Reward Model Training: A separate neural network (the Reward Model) is trained on this ranking dataset to predict scalar reward scores for given prompt-response pairs. 3. Reward Generation: The active model policy generates responses to new prompts, and the Reward Model evaluates these responses, assigning a score. 4. Policy Optimization: A reinforcement learning algorithm (typically Proximal Policy Optimization, PPO) is used to update the model parameters to maximize the reward, often utilizing a KL divergence penalty to maintain stability relative to the initial model.

評分準則

Award up to 4 marks as follows: [1 mark] for describing the collection of human preference data where multiple model outputs are ranked. [1 mark] for describing how a Reward Model is trained to predict human preference scores. [1 mark] for explaining how the active policy model generates outputs that are evaluated by the Reward Model. [1 mark] for explaining the optimization of the policy using a reinforcement learning algorithm (like PPO) to maximize rewards.
題目 5 · Focussed Discussion
6
With reference to the deployment of a domain-specific chatbot for a healthcare clinic, discuss the advantages and limitations of using Retrieval-Augmented Generation (RAG) compared to Fine-tuning a pre-trained Large Language Model (LLM) to ensure the chatbot provides accurate, up-to-date, and verifiable medical information.
查看答案詳解

解題

Retrieval-Augmented Generation (RAG) and Fine-tuning represent two distinct strategies for customizing Large Language Models (LLMs) for specialized domains such as healthcare. 1. Accuracy and Verifiability: RAG retrieves documents from a verified external medical database and injects them into the model's prompt context. This allows the model to ground its responses in authoritative clinical guidelines and provide explicit citations, enabling clinicians to verify the source. Fine-tuning, on the other hand, bakes knowledge directly into the weights of the neural network. This increases the risk of 'hallucinations' because the model cannot natively cite the specific training document that generated a particular fact. 2. Keeping Information Up-to-Date: Medical guidelines, drug safety alerts, and treatment protocols change frequently. RAG systems can be updated instantly simply by updating the document index in the vector database, with zero retraining cost. In contrast, keeping a fine-tuned model up-to-date requires constant, expensive retraining pipelines, making it impractical for rapidly evolving clinical facts. 3. Tone, Terminology, and System Latency: Fine-tuning is highly effective for teaching the model specialized medical jargon, clinical formatting styles, and adapting the model's overall tone. RAG does not change the base model's intrinsic language capabilities, so if the base model lacks medical reasoning skills, RAG alone may not suffice. Furthermore, RAG introduces latency because it requires a multi-step pipeline (vector search followed by LLM inference). Conclusion: For a healthcare clinic, RAG is critical to guarantee safety through verifiability and dynamic updates. Ideally, a hybrid approach—using a lightly fine-tuned model for medical terminology and formatting, combined with a RAG pipeline for factual retrieval—would yield the safest and most reliable results.

評分準則

[1-2 marks]: The response offers a basic description of either RAG or Fine-tuning but fails to compare them effectively or ground them in the healthcare domain context. Concepts may be confused. [3-4 marks]: The response compares RAG and Fine-tuning, discussing at least two distinct dimensions (e.g., accuracy, cost, or data currency). There is a clear link to the medical clinic context, but the discussion may lack depth on how 'verifiability' (citations) is achieved. [5-6 marks]: The response provides a comprehensive, balanced discussion addressing accuracy, data freshness, and verifiability. It correctly identifies that RAG is superior for external fact verification (citations) and dynamic data updates, whereas Fine-tuning is better for tone/terminology. It concludes with a logical recommendation (such as a hybrid model or prioritizing RAG) appropriate for a high-risk medical setting.
題目 6 · essay
12
The developers of EduBot, an educational chatbot designed to assist university students with academic advising, course content queries, and access to private student records, are evaluating two architectures for their system:

Option 1: Fine-tuning an open-source Large Language Model (LLM) using internal university data and hosting it on-premise.
Option 2: Utilizing a proprietary cloud-based LLM API integrated with a Retrieval-Augmented Generation (RAG) pipeline connected to the university’s databases.

Evaluate both options from technical, financial, and ethical/security perspectives. Recommend, with justification, which architecture is most suitable for EduBot's deployment in a university environment.
查看答案詳解

解題

### Technical Analysis
- **Option 1 (Fine-tuning & On-Premise)**: Fine-tuning updates the neural weights of an open-source model (such as Llama-3) on university curricula. This excels at adapting the model's tone, terminology, and deep domain knowledge. However, fine-tuning is inherently static; it cannot dynamically reflect real-time changes, such as a student's newly updated grades or last-minute course schedule changes. Hosting on-premise requires significant local computational resources (e.g., high-end GPUs) and complex system orchestration for low-latency inference.
- **Option 2 (Proprietary API & RAG)**: Retrieval-Augmented Generation (RAG) queries the university's database at runtime, fetches relevant documents (e.g., specific student transcripts, course syllabus), and injects them into the prompt's context window. This allows a proprietary cloud model (e.g., OpenAI GPT-4) to reason over real-time, highly dynamic data without retraining. This drastically reduces hallucinations because the model's response is grounded in the retrieved text. However, it introduces dependencies on network latency, API rate limits, and the context window capacity of the model.

### Financial Analysis
- **Option 1**: High Capital Expenditure (CapEx). Buying and installing local GPU clusters is highly expensive. Furthermore, ongoing Operational Expenditure (OpEx) includes local electricity, cooling, and high salaries for specialized machine learning engineers to maintain local servers and pipelines. However, there are no ongoing per-token API fees.
- **Option 2**: Low CapEx. No specialized local hardware is required. Instead, it features variable, ongoing OpEx based on API consumption (pay-per-token model). While initially cheaper, highly active chatbot deployments with massive student cohorts can lead to high and unpredictable monthly API costs, especially since RAG requires appending large context documents to every single prompt.

### Ethical & Security Analysis
- **Option 1**: Superior data security. Student records remain within the university's private firewall, complying with strict student data protection laws such as FERPA (in the US) or GDPR (in Europe). There is zero risk of data being leaked to third-party corporations or used to train public commercial models.
- **Option 2**: Significant privacy risks. Sending sensitive student data (such as grades, personal details, or disciplinary records) across external APIs raises major compliance issues. Unless the university secures an enterprise-grade contract guaranteeing that data is encrypted in transit and at rest and explicitly excluded from model training, this option presents severe liability concerns.

### Recommendation and Justification
Neither option is perfect in its pure form. However, because *EduBot* must handle private student records, compliance with data privacy laws is a non-negotiable ethical and legal constraint, which heavily penalizes Option 2. Concurrently, because *EduBot* must provide accurate, real-time data (e.g., individual student grades and schedules), fine-tuning alone (Option 1) is technically insufficient because weights cannot be retrained daily.

Therefore, the optimal solution is a **hybrid architecture**: deploying an **open-source RAG pipeline hosted entirely on-premise (or within a secure, dedicated private university cloud)**. By using an open-source LLM hosted locally, the university retains complete control over data privacy (solving the ethical issue). By utilizing a RAG pipeline rather than pure fine-tuning, the system can dynamically retrieve real-time student records from internal databases and feed them safely to the local LLM (solving the technical limitation of static data).

評分準則

Marks are awarded using the following 12-mark holistic rubric:

- **Level 4 (10-12 marks)**:
- Shows excellent understanding of fine-tuning, open-source hosting, APIs, and RAG architectures.
- Offers a balanced, deep evaluation across all three perspectives: technical (static vs. dynamic data, latency, hardware), financial (CapEx vs. OpEx), and ethical/security (FERPA/GDPR compliance, third-party data risks).
- Provides a highly realistic, well-justified recommendation (e.g., identifying that a hybrid approach—hosting a local RAG system—maximizes both privacy and real-time query capability).
- Terminology is accurate, clear, and highly professional throughout.

- **Level 3 (7-9 marks)**:
- Shows good understanding of both options and their general mechanisms.
- Evaluates most aspects (technical, financial, and security), though one perspective may be slightly less developed than the others.
- Provides a logical recommendation supported by relevant arguments from the analysis.
- Uses appropriate computer science vocabulary.

- **Level 2 (4-6 marks)**:
- Describes fine-tuning and API/RAG options but the analysis is descriptive rather than evaluative.
- Focuses heavily on one perspective (e.g., only data privacy) while ignoring others (e.g., financial or technical issues of static data in fine-tuning).
- Recommendation is superficial, general, or poorly justified.

- **Level 1 (1-3 marks)**:
- Shows limited or flawed understanding of LLM architectures.
- Fails to meaningfully compare the options or address the specific requirements of the university context.
- Recommendation is missing, incorrect, or lacks any technical justification.
題目 7 · essay
12
Placeholder duplicate removal
查看答案詳解

解題

null

評分準則

null

想知道自己有幾分把握?

Thinka 是 DSE 學生用的 AI 練習應用程式,有無限量練習題、即時自動批改和詳細解題步驟。逾 100,000 名學生用它確認自己真的識,而不只是「以為識」。

想練更多類似題型?在 Thinka 無限量操練,即時知道答案。

免費開始練習