No description
  • Python 90.8%
  • Makefile 3.5%
  • Shell 3.1%
  • Ruby 2.6%
Find a file
Tami Takamiya bd498e947d
Merge pull request #325 from ansible/TamiTakamiya/AAP-67117/enable-unit-tests
Enable unit tests in aap-rag-content repo
2026-04-03 13:16:03 -04:00
.github/workflows Update text.yml based on Cursorbot comment 2026-04-03 12:39:29 -04:00
.tekton Update Konflux references 2025-07-12 05:20:28 +00:00
aap-product-docs-plaintext/red_hat_content/documentation Update AAP 2.5/2.6 product documentation 2026-01-08 19:06:32 -05:00
additional_docs Update AAP Lifecycle Dates 2025-10-06 15:16:23 -04:00
byok AAP-67112: BYOK examples (#298) 2026-03-31 17:16:27 +02:00
embeddings_model Update download_embeddings_model.py 2025-04-29 13:17:04 -04:00
rag/vector_db/aap_product_docs/2.5 Restore /rag/vector_db for downstream build 2025-07-10 21:49:35 -04:00
red_hat_content/documentation/red_hat_ansible_automation_platform Update AAP 2.5/2.6 product documentation 2026-01-08 19:06:32 -05:00
scripts Revert lru_cache change per cursor comment 2026-04-03 12:36:20 -04:00
src/aap_rag_content Add --suppress-ping-url option 2026-04-01 20:48:49 -04:00
tests Remove mock_args 2026-04-03 12:33:34 -04:00
.flake8 Add Lightspeed docs to RAG DB 2024-11-04 13:56:13 -05:00
.gitignore AAP-67112: BYOK examples (#298) 2026-03-31 17:16:27 +02:00
.gitleaks.toml Re-organize aap-rag-content 2025-07-02 12:28:07 -04:00
.pre-commit-config.yaml Simplify check-uv-lock pre-commit hook to use uv lock --check 2026-03-23 10:03:03 -04:00
.python-version Update llama-stack to 0.2.12 2025-06-27 11:24:41 -04:00
artifacts.lock.yaml Update output-image and add artifacts.lock.yaml 2025-07-02 22:46:37 -04:00
build.yaml Update llama-stack to 0.2.14 2025-07-08 22:16:24 -04:00
Containerfile-aap Enable unit tests in aap-rag-content repo 2026-04-03 11:34:52 -04:00
entrypoint.sh AAP-62955: Fix ansible-ai-connect-operator regression causing CrashLoopBackOff in downstream devel pipelines (#284) 2026-01-20 16:35:09 +01:00
LICENSE Initial content 2024-10-04 11:34:39 -04:00
Makefile Fix a typo in Makefile 2026-04-03 12:26:11 -04:00
pyproject.toml Enable unit tests in aap-rag-content repo 2026-04-03 11:34:52 -04:00
README.md Enable unit tests in aap-rag-content repo 2026-04-03 11:34:52 -04:00
requirements.txt Update dependency cryptography to v46.0.6 (#318) 2026-03-26 14:41:24 -04:00
rpms.in.yaml Update rpms.lock.yaml for prefetch rpms 2025-06-06 19:17:25 -04:00
rpms.lock.yaml Update rpms.lock.yaml for prefetch rpms 2025-06-06 19:17:25 -04:00
run.yaml Fix embedding model configuration for sentence-transformers 2025-12-08 08:36:58 -05:00
ubi.repo Update rpms.lock.yaml for prefetch rpms 2025-06-06 09:47:36 -04:00
uv.lock Enable unit tests in aap-rag-content repo 2026-04-03 11:34:52 -04:00

aap-rag-content

Overview

This repository contains files for building a RAG (Retrieval-Augmented Generation) vector DB, which is used with the Ansible Lightspeed Intelligent Assistant (ALIA).

The source documents saved here were extracted from the document archive built for Red Hat Offline Knowledge Portal (OKP), which provides off-line access to Red Hat product documentation. Copies of markdown files are stored in this repository.

For generating vector DB, we use the aap_rag_content Python package located in the src/ directory, which provides document processing and vector database generation capabilities. The custom_processor_aap.py script uses this package to process AAP documentation and build the vector database.

Input files for Vector DBs

Input files that are used as the source of vector DBs are stored in the following directories:

  • /red_hat_content This directory stores the Markdown files extracted from the Mimir archive.
  • /aap-product-docs-plaintext This directory has Markdown files and their metadata files that are generated from the raw files under /red_hat_content. Metadata files are stored in the .metadata subdirectory with the same file name as its source and .json file extension.
  • /additional_docs This directory contains additional Markdown files that are used as the input for vector DB. Its .metadata subdirectory contains metadata JSON files.

Development Setup

Before running tests or working with the codebase, set up your development environment:

make setup

This command will:

  • Create a virtual environment (.venv/)
  • Install all project dependencies
  • Install development tools (pytest, black, mypy, ruff, etc.)

The project uses uv for dependency management, which provides fast and reliable package installation.

Running Unit Tests

To run the unit tests for the aap_rag_content package:

make unit-test

This will execute all tests in the tests/ directory using pytest with verbose output. The test suite includes tests for:

  • Metadata processing
  • Document processing
  • Vector database generation
  • Utility functions

Build a container image

Following command builds a container image, which includes the generated vector DB.

make build-image-aap

Push a container image to quay.io

podman login quay.io
podman push aap-rag-content quay.io/ansible/aap-rag-content