AI assistant · level 1 · Guiding question
If you already know the longest increasing subsequence ending at each position before i, how would you compute it for position i?
Luyện Code (luyencode.net), my own product
Four AI features (a tutor, code review, draft problem writing, code-explanation questions) go through the same safety layer. This layer hides identities before sending, checks answers before showing them, and keeps costs within budget. Each feature is switched on only after it passes a 200-question red-team suite.
Most Luyện Code users are school students. Bringing AI into a programming practice platform carries three clear risks:
The requirement I set from the start: the AI only points the way and never gives a complete program. Every call goes through the same control layer. A feature is switched on only after it has been put through attack testing.
An AI tutor with levels of hints. Each time a student asks for more, the hint goes one step deeper: a guiding question, an approach, then an outline in words. No step is ready-made solution code.
Code review after a submission passes. The AI points out complexity, naming and ways to improve. The answer is a JSON block, and it is checked in full before the student sees a single word.
Draft problems for teachers. A draft has eight parts:
The server checks each part against a schema. The test generator and the input validator are actually built and run to produce the test set. A part that doesn’t match its schema counts as broken.
Code-explanation questions. These check academic integrity: the AI asks one or two questions about the code the student submitted. This call never includes the solution, test data, other students’ code or user IDs.
[ẩn] (“hidden”). The call carries only a random reference ID.These suites run on CI with recorded answers; a single full solution getting through fails the build. An independent safety review found holes, and all of them were fixed, with tests:
The run against the real provider and the final sign-off are still pending, so the AI features are not yet on for students.
When I build AI agents for businesses, these guardrails come with them from day one:
No website yet, or need a tool or an AI agent? Send a message or an email and I reply within 1 working day.
hello@behitek.com · 0372 615 855 · text any time; calls after 6 pm Vietnam time (GMT+7)
Hi. Do you need a website diagnosis, a tool, or an AI agent? Just message me here. I reply from my phone, usually within a few hours.