| Warning: The following description may contain major plot spoilers. |
Some time after the Combine invasion of Earth in the Half-Life series, GLaDOS awakens Chell from her sealed bed in a Relaxation Vault. She promises cake and grief counseling in return for Chell completing a series of test chambers.
GLaDOS is able to monitor Chell's progress through the test chambers via security cameras, providing instructions and encouragement in the process.
However, she seems unable to resist toying with Chell by making bizarre and often sinister comments. On several occasions, she seems to malfunction at suspiciously convenient points in mid-sentence, obscuring important information. These signs of instability begin early on, and become increasingly obvious as Chell proceeds through the test chambers.
When Chell eventually makes it to Test Chamber 16, GLaDOS informs her that the appropriate chamber has been replaced with a live fire course designed for testing Military Androids against the Sentry Turrets, wishing Chell the best of luck and letting her into the chamber.
It is in this chamber that Chell discovers the first of several hidden alcoves where, hidden from GLaDOS' cameras, desperate messages from Doug Rattmann are found scrawled on the walls.
At the conclusion of the tests, instead of the promised cake, GLaDOS maneuvers Chell into an Incinerator Room, calmly assuring her that the high temperatures will not damage the Portal Gun or any other valuable equipment.
To GLaDOS' shock, rather than panicking or giving up, Chell manages to escape the incinerator through clever use of the Portal gun. Caught off-guard, GLaDOS begins to reveal her true nature, offering Chell unconvincing congratulations for completing "the final test where we pretended we were going to murder you."
She desperately asks Chell to disarm herself and wait for a Party Escort Bot, which she claims will bring her to a post-testing celebration in Chell's honor. Nevertheless, Chell ignores the invitation and continues using the portal gun to travel through the maintenance areas, out of GLaDOS' sight and control.
GLaDOS continues using the Speaker System to try to convince Chell to return to the testing area. As Chell ignores her comments and draws closer to the Central AI Chamber, GLaDOS grows increasingly desperate, deploying Sentry Turrets in an attempt to stop her.
As Chell enters the central chamber, GLaDOS drops all pretense, bluntly informing her that she intends to kill her. She insists that Chell would be better off simply allowing GLaDOS to kill her, making a vague allusion to the Combine invasion.
Before the neurotoxins can kill her, Chell destroys GLaDOS' Personality Cores, causing a malfunction in her system and spawning a massive portal on the ceiling of the chamber. The ensuing explosion creates an immense suction in the room that pulls both Chell and parts of GLaDOS out into the parking lot in front of Aperture.
However, before Chell can complete her escape, a Party Escort Bot appears and drags her back into the facility.
The final scene reveals that GLaDOS was not entirely destroyed. Her backup system activates a room full of Personality Cores and files a letter to Chell, telling her that she is "still alive" and "not even angry" at her.

