A Faster Route Through Decades of UN Documents

The International Committee of the Red Cross (ICRC) advises member states on international humanitarian law. That work often means finding language in older UN resolutions that can serve as precedent. The problem: those documents are PDFs, and searching them by hand is slow. The project described here replaces that manual slog with a live, natural-language search tool for a large corpus of UN resolutions.

Pipeline: From PDF to Relevant Result

The application is a single-page app hosted at resolutions.projectrefuge.io. The backing pipeline breaks down into four stages:

1. Text extraction and parsing

Raw text is pulled from UN Security Council Resolutions, Presidential Statements, and six years of General Assembly Resolutions using Amazon Textract. A Go script then applies regex matching to segment that text into individual resolutions, making the corpus easier to index and query.

2. Embeddings and database

A Node.js script was adapted from a MongoDB example to upload parsed resolutions as embeddings into a MongoDB Atlas database. Structuring the content that way makes searches both fast and semantically relevant.

3. Front end

The interface is a Vue.js single-page app. Users type plain-language queries—for example, “resolutions on humanitarian access in armed conflicts”—and get results in seconds rather than digging through PDFs.

4. Backend and hosting

AWS Lambda and API Gateway handle backend logic with automatic scaling. The full application is deployed under a subdomain on AWS Amplify. A Reference Architecture diagram showing the following: Text extraction and structuring Using Amazon Textract, I extracted raw text from decades’ worth of UN Security Council Resolutions and Presidential Statements and six years of UN General Assembly Resolutions. A Go script then parsed this text using Regex matching, segmenting it into individual resolutions for easier indexing. Search-ready database with MongoDB Atlas I adapted a Node.js script from MongoDB to upload the parsed resolutions as embeddings into a MongoDB Atlas database. This step ensures the content is structured for fast and relevant searches. User interface built with Vue.js The front end is an intuitive SPA created with Vue.js. Users simply enter semantic search queries—such as “resolutions on humanitarian access in armed conflicts”—and receive results in seconds. Backend hosted on AWS The backend relies on AWS Lambda and API Gateway, ensuring scalability and seamless performance. The entire application is hosted as a subdomain on AWS Amplify, combining reliability with ease of access.

Open Source as a Starting Point

The code for the tool is public in the projectrefuge/resolutions-search-template repository. The point of releasing it is reuse: with modest changes, the same architecture can index legal or policy document collections beyond UN materials. For nonprofits, it also demonstrates the value of owning your own code rather than being locked into vendor solutions. The stack choices—Textract for OCR, MongoDB Atlas for vector search, Vue.js for the UI, and serverless AWS for the backend—are all adaptable to other document types and query needs.

Organizations that want to build similar tools can look at GitHub for Nonprofits for resources. Developers interested in contributing to projects like this can browse the For Good First Issue program to find issues matched to their skills. The author indicates the process of identifying further opportunities with humanitarian actors is ongoing, with a focus on building collaboration between the technology and humanitarian sectors.