Semantic Search for Aviation Safety Reports Using Embeddings and Hybrid Search

beams · Other · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Aviation safety report search and risk analysis

Beams needed safety analysts to search and analyze large volumes of dense, multilingual, technical free-text aviation reports without manually reading every report or enumerating every synonym.

Constraints:

Architecture

Beams built a hybrid aviation safety search system on AWS: reports arrive through S3 or web flows, PII removal and translation run through Lambda/SQS orchestration, Azure OpenAI text-embedding-3-large produces embeddings, PGVector on PostgreSQL/RDS stores vectors, retrieval and reranking prioritize semantically similar reports, and a filter service combines semantic search with structured DNF filters over 35+ aviation attributes.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  A["Aviation safety reports"] --> B["Ingestion pipeline"]
  B --> C["SQS orchestration"]
  B --> D["Azure OpenAI embeddings"]
  D --> E["RDS PGVector store"]
  E --> F["Retriever"]
  F --> G["Reranker"]
  E --> H["Filter service"]
  I["Natural-language filter translator"] --> H
  G --> J["Search results"]
  H --> J
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Aviation safety reports Free-text incident reports from pilots, cabin crew, and ground operations. Ingestion pipeline
Ingestion pipeline Receives reports through S3 or web, removes PII, translates text, and coordinates processing. Aviation safety reports, SQS orchestration, Azure OpenAI embeddings, RDS PGVector store
SQS orchestration Queues report processing steps to absorb spikes and run work bit by bit. Ingestion pipeline
Azure OpenAI embeddings Generates text-embedding-3-large vectors for report search. Ingestion pipeline, RDS PGVector store
RDS PGVector store PostgreSQL/RDS storage for report vectors and SQL-accessible metadata. Azure OpenAI embeddings, Retriever, Filter service
Retriever Embeddings-based similarity retrieval over unstructured reports. RDS PGVector store, Reranker
Reranker Second-stage model that improves precision over retrieved report candidates. Retriever, Search results
Filter service Combines DNF filters, 35+ attributes, operators, joins, and semantic search into SQLAlchemy queries. RDS PGVector store, Natural-language filter translator, Search results
Natural-language filter translator LLM-based experiment that converts user text into filter structures. Filter service
Search results Ranked and filtered safety-report results for analysts. Reranker, Filter service

Data flow

Customer reports enter through S3 buckets or realtime web submissions, pass through PII removal and translation, are embedded with Azure OpenAI, land in RDS with PGVector, and are searched through a retrieval-rerank path plus structured filters generated from a UI or natural-language filter translation.

4 supporting quotes
“our customers send us the reports in various ways whether it is via S3 uh buckets uh because it's in bulk or whether it's like real time over uh web”transcript, stated
“the first step is always PII removal to be compliant it depends on which airline it is sometimes”transcript, stated
“we use Azure OpenAI at the moment. So, we started with ADA O3, but then eventually now ended up uh using the text embedding 3 large”transcript, stated
“you have to compare there uh combine the AI search, the semantic search with all these filters.”transcript, stated

Why this architecture

Beams chose a simple AWS/RDS/PGVector foundation because the team wanted to solve the aviation safety workflow with minimal complexity first, while hybrid search was necessary because semantic similarity alone did not cover structured safety filters.

3 supporting quotes
“we wanted to start simple and add complexity later”transcript, stated
“we wanted to do it as fast as possible with basically the less complexity in place”transcript, stated
“search is not just AI and and and you know just doing the fuzz in the text search but it's a combination of search and filtering”transcript, stated

Models used: Azure OpenAI text-embedding-3-large · rerank model · LLM for filter translation · small PII models

Scale

Alternatives considered (roads not taken)

Specialized vector databases first

Rejected because: The team favored starting simple on existing AWS/RDS infrastructure rather than adopting more complex vector database infrastructure immediately.

“we could have gone that direction right um instead of going to PJ vector but basically our philosophy was not you know the tech is a is a tool”transcript, stated

Semantic search without structured filtering

Rejected because: Aviation users already had structured flight and report metadata, and filtering became core to project success.

“we do do semantic search but that is not nearly all of it right you have a lot of structured data already”transcript, stated
“hybrid search is is is is um one of the core um um attribute for us to decide on that”transcript, stated

Best available reranker regardless of latency

Rejected because: User experience would suffer if users waited 10-15 seconds, so Beams chose a lightweight model with one-to-two-second speed.

“we could have you know take the best re-rank model out there but uh in terms of user experience that would not be good”transcript, stated
“we decided for a more lightweight model right where um precision is still good but speed is like for example one or two seconds maximum”transcript, stated

Patterns

hybrid-search (retrieval)

Beams combines semantic vector search with structured filters over aviation attributes rather than treating search as only embeddings.

“you have to compare there uh combine the AI search, the semantic search with all these filters.”transcript, stated
“it's a combination of search and filtering um which which makes uh basically the success of this project.”transcript, stated

retrieval-ranking (retrieval)

The system retrieves semantically similar reports, then reranks the candidate set for better precision.

“there's a retriever step, right? Where we putting all documents in there. We're creating embeddings”transcript, stated
“once we have this uh basically filtered document set right that is prioritize already we want to rerank them”transcript, stated

privacy-preserving-processing (privacy)

The ingestion pipeline removes PII before embedding/search processing, sometimes with customer-side small models.

“the first step is always PII removal to be compliant it depends on which airline it is sometimes”transcript, stated

async-message-orchestration (infrastructure)

SQS queues orchestrate Lambda-based report processing, including spike handling for bulk customer uploads.

“different steps run in like individual um containers and everything is being orchestrated by uh an SQSQ.”transcript, stated

Tradeoffs

Use PGVector on RDS.

Chose PostgreSQL/RDS with PGVector over specialized vector database first.

Rationale: PGVector let the team stay on AWS/RDS, use SQL, and keep complexity low for initial user testing.

“PG vector basically offers all everything already what possess would offer, right? So it's uh basically asset compliance has point in time recovery”transcript, stated

Choose hybrid search.

Chose semantic search plus structured filtering over semantic similarity alone.

Rationale: Safety analysts need to combine incident meaning with flight data, classifications, and attribute constraints.

“you have a lot of structured data already either because we extracted it or uh because the customer like brought those to us”transcript, stated

Queue report processing.

Chose SQS-backed asynchronous processing over instant synchronous processing for every ingest.

Rationale: Bulk customer uploads create spikes and some processing takes meaningful time.

“some customers that uh because of their own limitations internally uh they just send us data in bulk a few times per day.”transcript, stated

Gotchas (what bit them)

Aviation text is hard for generic search and LLMs.

Root cause: Reports contain dense jargon, inconsistent abbreviations, multilingual text, and negation.

Resolution: Use embeddings, translation, domain classifications, and hybrid filters rather than only keyword matching.

“there's a lot of technical jargon. Um there's a lot of abbreviations. These abbreviations also quite often they're not consistent between different airlines”transcript, stated
“a no stall warning might not mean that a stall warning has been triggered.”transcript, stated

Filter logic became complex even with tests.

Root cause: Dozens of attributes, operators, joins, and subselects interacted in SQL generation.

Resolution: Experiment with natural-language filter generation and consider more mature search infrastructure.

“the complexity is so big that even though all the test coverage is there, it's kind of hard to get all the data in that replicate those”transcript, stated

The best reranker can be too slow for users.

Root cause: Reranking precision competes with acceptable response time.

Resolution: Choose a lightweight reranker with good precision and one-to-two-second response expectations.

“reranking um it's always a trade-off between speed and performance right”transcript, stated

Evaluation

Beams evaluated choices empirically through precision-recall measurements for embeddings, reranker speed/precision tradeoffs, test-driven filter development, and user reception of the search feature.

Metrics: precision · recall · reranker latency · filter correctness · user acceptance · retrieval speed

3 supporting quotes
“via empirical measurements for our purposes, we basically found that with a dimensionality of 2,00 that seems to hit the sweet spot between precision and recall.”transcript, stated
“we have we work in a very test-driven settings. So it means writing tests first.”transcript, stated
“the feature was was really like uh welcomed by our user.”transcript, stated

Outcomes

The source describes hundreds of thousands of reports, 35+ filter attributes, queued processing for bulk spikes, and retrieval expected in the microseconds area after ingestion.

3 supporting quotes
“you don't want to end up having to write like 50 different variations of the same search terminology”transcript, stated
“the retrieval usually should be in the microsconds area.”transcript, stated
“we are actually building another search company right instead of filtering focusing on on building the product.”transcript, stated