All articles

Build or Buy AI Document Search? Hong Kong Guide

A ring of brass keys on a locked steel filing cabinet with a handwritten index card on the top drawer.

If you want AI to answer questions from your firm's own files, you have two routes. You can build a system yourself from free, open-source parts, or you can buy a ready-made product. For most small Hong Kong firms, buying is the safer and cheaper route. Building is realistic only if someone in the firm can look after it every week, for years.

This article explains why, using what Hong Kong's privacy regulator says about buying and running AI. It is general information, not legal advice.

What "AI document search" actually is

The technique has a plain name: retrieval-augmented generation, or RAG. When you ask a question, the system first finds the most relevant passages in your documents. It then passes those passages to an AI model, which writes an answer. Researchers describe it as retrieving evidence from external collections and placing it in the model's context, which can make answers traceable to their source.

That last point matters to a partner. An answer you cannot trace to a document is an answer you cannot check.

Why "build it ourselves" looks attractive

Free code for this is easy to find. A technically minded colleague, or a freelancer, can have a demonstration running in a weekend. There is no subscription, and the files seem to stay under your control.

The demonstration is the easy part. The hard parts come afterwards, and they are the parts a firm is judged on: who may see which file, how updates are applied, and what happens when something goes wrong.

The legal duty stays with your firm either way

Hong Kong's Personal Data (Privacy) Ordinance (Cap. 486) applies whether you build or buy. In June 2024 the Privacy Commissioner for Personal Data (PCPD) published a non-binding "Artificial Intelligence: Model Personal Data Protection Framework". Its aim is to give organisations practical advice that fits the Ordinance when they buy and use AI.

Note one detail. The framework is written for organisations that procure AI from outside suppliers. A firm that develops its own AI model is pointed instead to the PCPD's 2021 ethics guidance. A small firm assembling its own system sits in a grey area, so ask a lawyer which guidance applies to you.

Either way, the framework's four areas are a useful test for any option:

  • AI strategy and governance.
  • Risk assessment and human oversight.
  • Customising the model, and running and managing the system.
  • Communication with staff, suppliers, customers and regulators.

What a DIY system asks of you

Taking the framework's points one by one shows the work involved.

Governance. The framework recommends a governance committee with enough resources, expertise and authority to oversee buying and using AI. Freshfields, summarising it, describes a cross-functional team drawn from operations, procurement, legal and cybersecurity, reporting to the board. A small firm will scale this down. A named partner and a written note of who decides is a sensible minimum.

Security of the parts you use. The framework says that where an organisation uses open-source components, it should follow industry-best security practice in maintaining the code and pay attention to security advisories and alerts. Someone must read those alerts and apply updates. If your freelancer moves on, that duty does not move with them.

Who sees what. A search system that can read every file will happily quote a salary letter to a junior clerk. Researchers at Hong Kong Polytechnic University and HKUST (Guangzhou) surveyed 135 studies on RAG security. They conclude that secure systems need controls on the path to the documents, including access control, as well as general protections for the AI model. They also describe attacks in which instructions hidden inside a retrieved document try to steer the answer. Think of a PDF from an outside party that contains text written to mislead the tool.

Incidents. The framework recommends an AI incident response plan to monitor and address incidents. Freshfields notes that it supplements, and does not replace, a data breach response plan.

Testing. The framework asks organisations to test and validate models before deployment. Freshfields adds that testing should be more rigorous as the risk rises. For a firm, that means keeping a set of 20 questions to which you know the answers, and re-running them after every change.

What buying does and does not solve

Buying moves much of the technical work to a supplier. It does not move your responsibility. The framework suggests assessing the supplier's competence, deciding whether a data processor agreement is needed, and reviewing the AI solution against set criteria. Freshfields adds two points: use reputable suppliers that follow international technical and governance standards such as ISO or IEEE, and test or audit third-party systems for security and privacy risks.

Put plainly, before you sign, ask the supplier:

  1. Where are our files stored, and can one firm's data ever be seen by another?
  2. Does each answer show the documents it came from?
  3. Can we limit who sees which folders?
  4. Does the tool work with Chinese and English documents?
  5. What happens to our data if we leave?
  6. What do you do if something goes wrong, and how will you tell us?

Get the answers in writing. If a supplier claims a certification, ask to see it. Do not take it on trust.

Do not forget staff habits

Whichever route you choose, staff behaviour decides much of the risk. The PCPD published a checklist in 2025 on staff use of generative AI. According to a summary by Tanner De Witt, a policy should say which tools are approved and for what work, limit what staff may type in, set how output is checked and stored, restrict use to work-provided devices, and set out how to report a breach or an odd result. The PCPD's Commissioner has also warned that staff entering confidential customer data into chatbots is a real concern, because the AI may retain that data to answer later queries.

A fair way to decide

Choose to build only if all of these are true:

  • You have a named person with the skill and the time to maintain it.
  • You can restrict access folder by folder, and prove it.
  • You have a written plan for security updates and incidents.
  • Your lawyer has confirmed which PCPD guidance applies to you.

If any answer is no, buy.

If you want to try the bought route, Midas is an AI workspace for firms, made by h.work in Hong Kong. It connects to the files and tools a firm already uses and answers questions from them. Each answer shows the documents it came from, it works with documents in English and Chinese, and each firm's data is kept separate from every other firm's. You can start free and test it on a small set of files.

What to do this week

  1. Write down the three questions you most want answered from your files.
  2. Name one partner as the person who decides about AI tools.
  3. Write a one-page staff rule using the six areas in the PCPD checklist.
  4. Make a list of 20 test questions with known answers.
  5. Send the six supplier questions above to any product you are considering, and ask for replies in writing.
  6. Keep a short note of why you chose to build or buy. If a regulator or client asks, you will have an answer.

This article is general information and not legal advice. For your own firm, ask a Hong Kong lawyer.

Share

Midas

Answers from everything your team knows.

Ask a question in plain English and get an answer drawn from your firm’s files.