---
estimated_steps: 6
estimated_files: 3
skills_used: []
---

# T02: Enrich Qdrant embedding text and payloads

In `backend/pipeline/stages.py` stage6_embed_and_index:
1. For technique pages, change embedding text from `'{title} {summary} {topic_category}'` to `'{creator_name} {title} {topic_category} {tags_joined} {summary}'` where creator_name comes from the joined Creator row and tags_joined is `' '.join(topic_tags)`.
2. For key moments, change from `'{title} {summary}'` to `'{creator_name} {title} {summary}'`.
3. In `qdrant_client.py`, add `creator_name` to key_moment payload dict.
4. In stage 6, fetch creator name for moment enrichment (creator available via source_video.creator join).
5. Add an admin endpoint `POST /admin/pipeline/reindex-all` that triggers stage 6 re-run for all videos with processing_status='complete'. This allows re-indexing after embedding text changes.

## Inputs

- `backend/pipeline/stages.py`
- `backend/pipeline/qdrant_client.py`

## Expected Output

- `backend/pipeline/stages.py (enriched embedding text)`
- `backend/pipeline/qdrant_client.py (creator_name in key_moment payload)`
- `backend/routers/pipeline.py (reindex-all endpoint)`

## Verification

Inspect stage 6 code to confirm enriched text. Hit reindex endpoint and verify Qdrant points contain creator_name in payload.
