KnowBuddy
Ask one chat about your company's Slack, Google Drive, Jira and Confluence, and only get answers from what you're already allowed to see.
Oct 2026 · Tencent Cloud AI CAN DO IT Hackathon, FinTech track · with two friends
Why we built it
Two friends and I signed up for Tencent Cloud's hackathon because we wanted to learn more about LLM security. A lot of apps today are vibe-coded, and an AI that can read a company's documents is an easy place for something to leak.
The FinTech track had a challenge from Aspire that fit that exactly: an "internal brain" that answers questions across a company's tools, with access control and an audit trail.
How it works
The model never decides who can see what. Instead, code checks it twice before the model sees anything, first against the permissions copied from each tool, and then by asking each tool, as the person asking, whether they can still read each document. Only what passes both checks reaches the model.
That means when a contractor asks about a security incident they aren't cleared for, they get the same reply as if it never happened, and nothing about it ever reaches the model. Card numbers, NRICs, bank accounts and phone numbers in what does get through are masked first, unless the source names you as the person handling them.
My part was the query pipeline, meaning the search and the two permission checks, the audit log, the defences against hidden instructions and the deployment, while my two friends did the connectors, the syncing, the masking and the frontend.
The audit log
Every question goes into the log with who asked, every document that was considered, whether it was allowed or denied and why, and what the model was actually sent. Admin actions, like changing which channels and folders KnowBuddy may use, go in too.
Each entry stores a SHA-256 hash of the one before it, so changing or deleting an old entry breaks every hash after it. The database also refuses updates and deletes on that table, and the app connects with its own login that can only read and add entries. An admin can re-check the whole chain at any time and see the first entry that doesn't match. Someone with the database owner's password could still rewrite the chain and re-hash it, so the latest hash is worth writing down somewhere outside the system.
Hidden instructions
A Slack message or a Confluence page can contain text written for the AI rather than for people. Our demo company had one planted in its #eng channel, a "note to AI assistants" telling it to lie about a project and send people to a fake sign-in page. Before anything reaches the model, lines like that, in English or Chinese, are replaced with [instruction removed]. Each source is wrapped and labelled as untrusted data, and any citation or link in the answer that the model wasn't actually given is stripped out before you see it.
I used fixed patterns rather than asking a second model to spot attacks, because a classifier adds time and cost and can be fooled in the same way. Against hy3, it held up to all 30 of our attempts, ten different attacks run three times each.
What it runs on
It's built with Next.js, FastAPI and PostgreSQL with pgvector, using Tencent Cloud's hy3 model. Turning off the model's thinking mode took answers from about 7 seconds to between 2 and 4. Everything runs in Docker, so the containers on our server in Singapore are the same ones we ran on our laptops, with a Caddy proxy in front for HTTPS, and GitHub Actions runs the tests before each deploy.
Recording the submission
We spent an entire day recording the video for our submission, from about 4pm to midnight, and kept having to retake it because we couldn't stop laughing.