Перейти к содержанию
НОВОЕПознакомьтесь с Alaaddin — вашим ИИ-джинном с голосом. trig8n запускается 1 января 2027. Что нового

Библиотека / RAG и базы знаний

RAG и базы знаний

Check consent before pgvector indexing in Postgres with OpenAI and Slack

On a schedule, it answers questions from your own knowledge base with OpenAI / ChatGPT using PGVector, Postgres, Slack.

Что делает

## Check consent before embedding records into a pgvector index Hundreds of workflows load documents, chunk them and push them into a vector store. Almost none ask whether they are allowed to. This one puts a gate in front of the index: every record is checked against a consent register first, and anything without a lawful basis is refused with its reason. ### How it works Records waiting to be indexed and the consent register are read separately, because in real setups the two live in different systems. Each record then gets one decision with six independent refusal grounds. Special category data is refused outright, because it needs its own Article 9 condition rather than ordinary consent. Withdrawn consent stops anything new being indexed. An objection to profiling refuses the record even when consent exists. Retention that has run out refuses it even though the consent was once valid. And purpose limitation is the one most pipelines get wrong: consent for support or marketing is not consent to be embedded into a model index. A record whose register entry is missing the fields the decision needs is held, not refused. Undecidable is a third answer, and guessing either way is what this exists to prevent. Eligible records are embedded. Every decision and its ground goes into an inclusion manifest, so months later you can prove exactly what was in the index and why. ### Setup 1. Create the consent register, documents and manifest tables, and enable the pgvector extension. 2. Connect Postgres, an embeddings provider and Slack. 3. Open Consent Rules and set required_purpose to the exact purpose string your register uses. A refusal here is a legal decision, so the ground is recorded, never just a count.

Шаги

  1. Index Run Every Night
  2. Consent Rules
  3. Read The Records Waiting To Be Indexed
  4. Read The Consent Register
  5. Match Each Record To Its Consent
  6. Decide If This Record May Be Embedded
  7. Where Does This Record Go?
  8. Embed In Batches
  9. Add To The Index
  10. Turn The Text Into Vectors
  11. Load The Record Text
  12. Split Long Records
  13. Mark The Record As Indexed
  14. Write The Inclusion Manifest

Всего шагов: 21.

Похожие автоматизации