Skip to content

Conversation

@Jayesh45-master
Copy link

PR Title

Create ADL Search Service using Vector Similarity (Qdrant)

PR Description

Fixes #346

Summary
This PR introduces an initial implementation of the ADL Search Service, an API server that accepts a conversation and returns related ADLs (Action Definition Languages) using semantic similarity.
The service stores ADLs in a vector database and performs similarity search against incoming conversations to identify the most relevant ADLs. The implementation focuses on correctness, clarity, and extensibility rather than production hardening, making it suitable as a foundation for future improvements.

Motivation
As ADLs grow in number and complexity, keyword-based matching becomes insufficient for reliably identifying relevant actions from natural language conversations.

The goal of this service is to:
Enable semantic search over ADLs
Improve discoverability of relevant ADLs from free-form conversations
Provide a simple, well-structured reference implementation that can be iterated on
This aligns with the long-term objective of building intelligent, context-aware systems on top of ADLs.

Design Overview
The service is implemented as a lightweight API server with the following responsibilities:
Vector Storage
ADLs are embedded into vectors using a sentence-level embedding model
Vectors and metadata are stored in Qdrant
Semantic Search
Incoming conversations are embedded at query time
The vector database is queried using similarity search
Top-K related ADLs are returned with metadata
API Layer
Simple HTTP endpoints for indexing and querying
Clear separation between embedding logic, storage, and API handling
The design intentionally avoids premature optimization and keeps all components replaceable (e.g., embedding model, vector store).

What’s Included
API Server
Health check endpoint
ADL indexing endpoint
ADL query endpoint (semantic similarity)
Vector Backend
Qdrant used as the vector database
Collection initialization handled automatically
Embedding
Sentence-level embeddings generated at runtime
Embeddings stored alongside ADL metadata
Sample Data
Example ADLs provided for local testing and validation

Documentation
README with setup and usage instructions
Clear guidance for local development
Tech Stack
Language: Python
API Framework: FastAPI
Vector Database: Qdrant
Embeddings: Sentence Transformers
(Design is portable and can be adapted to Kotlin/Ktor in future iterations.)

Testing
The following manual verification was performed locally:
Indexed sample ADLs into Qdrant
Queried the service with natural language conversations
Verified that semantically related ADLs are returned
Confirmed API responsiveness via health endpoint
Local build and run:
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrant
python -m pip install -r adl-search-service/requirements.txt
uvicorn adl-search-service.app.main:app --reload

Backward Compatibility
No existing functionality is modified
The service is additive and self-contained
No breaking changes introduced

Future Work
Persistent storage and retention policies
Authentication and authorization
Ranking improvements and filtering
Batch indexing and async ingestion
Kotlin/Ktor implementation

Checklist
Clear problem statement and motivation
Minimal, focused implementation
No production assumptions
Documented setup and usage
Respectful, inclusive communication

@patwlan
Copy link
Contributor

patwlan commented Jan 6, 2026

Hi @Jayesh45-master , could you add the Copyright header to the new files.

Should be something like:

// SPDX-FileCopyrightText: 2025 Deutsche Telekom AG and others
//
// SPDX-License-Identifier: Apache-2.0

the following files are missing it:

  • adl-search-service/Dockerfile
  • adl-search-service/app/main.py
  • adl-search-service/requirements.txt
  • adl-search-service/sample_adls.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create ADL Search Service

2 participants