Spaces:
Sleeping
Sleeping
Added cert narrative docs
Browse files- ANSWER.md +146 -0
- pstuts_rag/CERT_SUBMISSION.md +159 -0
ANSWER.md
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Task 1: Defining your Problem and Audience
|
2 |
+
|
3 |
+
**Problem:** Locating specific Photoshop information in long video tutorial transcripts is difficult and time-consuming.
|
4 |
+
|
5 |
+
**Users and their Problem:** Photoshop learners (designers, photographers, students, hobbyists) often struggle with inefficiently searching video tutorials for specific techniques. They need a quick way to query tutorial content for direct, concise answers, saving time and reducing learning frustration.
|
6 |
+
|
7 |
+
# Task 2: Propose a Solution
|
8 |
+
|
9 |
+
**Our Solution:** An agentic Retrieval Augmented Generation (RAG) system answers Adobe Photoshop questions. Users interact via a chat interface (Chainlit, as seen in `app.py`). The system queries its tutorial transcript knowledge base and can use Tavily for web searches, providing comprehensive answers.
|
10 |
+
|
11 |
+
**The Tech Stack 🛠️:** (Primary sources: `app.py`, `pstuts_rag/datastore.py`, `pyproject.toml`, `README.md`)
|
12 |
+
|
13 |
+
* **LLM:** OpenAI model (e.g., `gpt-4.1-mini` in `app.py`), selected for strong language capabilities.
|
14 |
+
* **Embedding Model:** An open-source model, `Snowflake/snowflake-arctic-embed-s` (see `Fine_Tuning_Embedding_for_PSTuts.ipynb`), fine-tuned for domain-specific relevance.
|
15 |
+
* **Orchestration:** LangChain & LangGraph (`app.py`), for building the RAG application and managing agent workflows.
|
16 |
+
* **Vector Database:** Qdrant (`pstuts_rag/datastore.py`), for efficient semantic search of tutorial transcripts.
|
17 |
+
* **Monitoring:** W&B (Weights & Biases) is present in `notebooks/` and `Fine_Tuning_Embedding_for_PSTuts.ipynb`, used for experiment tracking during development.
|
18 |
+
* **Evaluation:** RAGAS (`evaluate_rag.ipynb`, `pyproject.toml`), for assessing RAG pipeline quality.
|
19 |
+
* **User Interface:** Chainlit (`app.py`, `chainlit.md`), for creating the interactive chat application.
|
20 |
+
* **Serving & Inference:** Docker (`Dockerfile`), for containerized deployment (e.g., on Hugging Face Spaces, as suggested in `README.md` metadata).
|
21 |
+
|
22 |
+
**The Role of Agents 🕵️♂️:** (Primary source: `app.py`)
|
23 |
+
|
24 |
+
The system uses a LangGraph-orchestrated multi-agent approach:
|
25 |
+
1. **Supervisor Agent:** Manages the overall workflow. It receives the user query and routes it to the appropriate specialized agent based on its interpretation of the query (defined in `SUPERVISOR_SYSTEM` prompt and `create_team_supervisor` in `app.py`).
|
26 |
+
2. **Video Archive Agent (`VIDEOARCHIVE`):** This is the RAG agent. It queries the Qdrant vector store of Photoshop tutorial transcripts to find relevant information and generates an answer based on this retrieved context. (Uses `create_rag_node` from `pstuts_rag.agent_rag`).
|
27 |
+
3. **Adobe Help Agent (`ADOBEHELP`):** This agent uses the Tavily API to perform web searches if the supervisor deems it necessary for broader or more current information. (Uses `create_tavily_node` from `pstuts_rag.agent_tavily`).
|
28 |
+
The supervisor then determines if the answer is complete or if further steps are needed.
|
29 |
+
|
30 |
+
# Task 3: Dealing with the Data
|
31 |
+
|
32 |
+
Our Photoshop RAG system uses specific data and chunking for accurate, relevant answers.
|
33 |
+
|
34 |
+
**1. Data Sources & External APIs 📊+🌐:**
|
35 |
+
|
36 |
+
* **Primary Data Source:** JSON transcript files from Photoshop video tutorials (e.g., `data/dev.json`, loaded in `app.py`). *Purpose:* Core knowledge base, processed and indexed in Qdrant for semantic search.
|
37 |
+
* **External API:** Tavily Search API (configured in `app.py`). *Purpose:* Augments knowledge with web search results via the `ADOBEHELP` agent for current or broader topics.
|
38 |
+
|
39 |
+
**2. Default Chunking Strategy 🧠✂️:** (Source: `pstuts_rag/datastore.py`'s `chunk_transcripts` function)
|
40 |
+
|
41 |
+
A **semantic chunking** strategy is employed:
|
42 |
+
1. **Initial Loading:** Transcripts are loaded both entirely per video (`VideoTranscriptBulkLoader`) and as individual sentences/segments with timestamps (`VideoTranscriptChunkLoader`).
|
43 |
+
2. **Semantic Splitting:** `SemanticChunker` (LangChain, using `OpenAIEmbeddings`) splits full transcripts into semantically coherent chunks.
|
44 |
+
3. **Metadata Enrichment:** These semantic chunks are enriched with start/end times by mapping them back to the original timestamped sentences.
|
45 |
+
|
46 |
+
* **Why this Strategy?** Ensures topically focused chunks for better retrieval relevance, provides richer context to the LLM, and allows linking back to video timestamps.
|
47 |
+
|
48 |
+
**3. [Optional] Specific Data Needs for Other Parts 🧩:**
|
49 |
+
|
50 |
+
* **Embedding Model Fine-Tuning (Task 6):** The `Fine_Tuning_Embedding_for_PSTuts.ipynb` notebook generated/used a question-passage dataset from Photoshop tutorials (detailed in `dataset_card.md`) to adapt the `Snowflake/snowflake-arctic-embed-s` model for better Photoshop-specific retrieval.
|
51 |
+
* **Evaluation & Golden Dataset (Tasks 5 & 7):** The process for generating the "Golden Data Set" (question-context-answer triplets) used for RAGAS evaluation is detailed in the `create_golden_dataset.ipynb` notebook within the `PsTuts-VQA-Data-Operations` repository ([https://github.com/mbudisic/PsTuts-VQA-Data-Operations](https://github.com/mbudisic/PsTuts-VQA-Data-Operations)). This dataset, subsequently referred to as `golden_small_hf` on Hugging Face, was then used in the main project's `evaluate_rag.ipynb` for benchmarking.
|
52 |
+
|
53 |
+
# Task 4: Building a Quick End-to-End Prototype
|
54 |
+
|
55 |
+
An end-to-end prototype RAG system for Photoshop tutorials is built and deployable.
|
56 |
+
|
57 |
+
**1. The Prototype Application 🖥️:** (Source: `app.py`)
|
58 |
+
|
59 |
+
The `app.py` script is the core prototype. It uses Chainlit for the UI, LangChain/LangGraph for orchestration, Qdrant for the vector store, and OpenAI models for embeddings and generation. It loads data, builds the RAG chain, and manages the agentic workflow for user queries.
|
60 |
+
|
61 |
+
**2. Deployment 🚀 (Hugging Face Space):**
|
62 |
+
|
63 |
+
The repository is structured for Hugging Face Space deployment:
|
64 |
+
* `README.md` contains Hugging Face Space metadata (e.g., `sdk: docker`).
|
65 |
+
* A `Dockerfile` enables containerization for deployment.
|
66 |
+
This setup indicates the prototype is packaged for public deployment.
|
67 |
+
|
68 |
+
# Task 5: Creating a Golden Test Data Set
|
69 |
+
|
70 |
+
The creation of the "Golden Test Data Set" is documented in the `create_golden_dataset.ipynb` notebook in the `PsTuts-VQA-Data-Operations` repository ([https://github.com/mbudisic/PsTuts-VQA-Data-Operations](https://github.com/mbudisic/PsTuts-VQA-Data-Operations)). This dataset (named `golden_small_hf` on Hugging Face) was then utilized in the `notebooks/evaluate_rag.ipynb` of the current project to assess the initial RAG pipeline with RAGAS.
|
71 |
+
|
72 |
+
**1. RAGAS Framework Assessment & Results 📊:**
|
73 |
+
|
74 |
+
The initial RAG pipeline ("Base" model, likely `text-embedding-3-small` before fine-tuning) yielded these mean RAGAS scores:
|
75 |
+
|
76 |
+
| Metric | Mean Score |
|
77 |
+
|---------------------------------|------------|
|
78 |
+
| Faithfulness | 0.721 |
|
79 |
+
| Answer Relevancy | 0.914 |
|
80 |
+
| Context Recall | 0.672 |
|
81 |
+
| Factual Correctness (mode=f1) | 0.654 |
|
82 |
+
| Context Entity Recall | 0.636 |
|
83 |
+
|
84 |
+
*(Scores from `notebooks/evaluate_rag.ipynb` output for the "Base" configuration)*
|
85 |
+
|
86 |
+
**2. Conclusions on Performance and Effectiveness 🧐:**
|
87 |
+
|
88 |
+
* **Strengths:** High **Answer Relevancy (0.914)** indicates the system understands queries well.
|
89 |
+
* **Areas for Improvement:**
|
90 |
+
* **Faithfulness (0.721):** Answers are not always perfectly grounded in retrieved context.
|
91 |
+
* **Context Recall (0.672):** Not all necessary information is always retrieved.
|
92 |
+
* **Factual Correctness (0.654):** Factual accuracy of answers needs improvement.
|
93 |
+
* **Overall:** The baseline system is good at relevant responses but needs better context retrieval and factual accuracy. This benchmarks a clear path for improvements, such as embedding fine-tuning.
|
94 |
+
|
95 |
+
# Task 6: Fine-Tuning Open-Source Embeddings
|
96 |
+
|
97 |
+
To enhance retrieval performance, an open-source embedding model was fine-tuned on domain-specific data.
|
98 |
+
|
99 |
+
**1. Fine-Tuning Process and Model Link 🔗:**
|
100 |
+
|
101 |
+
* **Base Model:** `Snowflake/snowflake-arctic-embed-s` was chosen as the base model for fine-tuning.
|
102 |
+
* **Fine-tuning Data:** A specialized dataset of (question, relevant_document_passage) pairs derived from the Photoshop tutorials was generated/used, as detailed in `dataset_card.md` and implemented in `notebooks/Fine_Tuning_Embedding_for_PSTuts.ipynb`.
|
103 |
+
* **Process:** The fine-tuning was performed using the `sentence-transformers` library, with training objectives designed to improve the model's ability to map Photoshop-related queries to relevant transcript passages. The process and evaluation were tracked using W&B.
|
104 |
+
* **Resulting Model:** The fine-tuned model was saved and pushed to the Hugging Face Hub.
|
105 |
+
* **Hugging Face Hub Link:** The fine-tuned embedding model is available at:
|
106 |
+
[mbudisic/snowflake-arctic-embed-s-ft-pstuts](https://huggingface.co/mbudisic/snowflake-arctic-embed-s-ft-pstuts)
|
107 |
+
|
108 |
+
*(Evidence for this is in `notebooks/Fine_Tuning_Embedding_for_PSTuts.ipynb`, specifically the `model.push_to_hub` call and its output. The `app.py` can be (or is) configured to use this fine-tuned model for the embedding step in the RAG pipeline.)*
|
109 |
+
|
110 |
+
# Task 7: Assessing Performance
|
111 |
+
|
112 |
+
Performance of the RAG application with the fine-tuned embedding model (`mbudisic/snowflake-arctic-embed-s-ft-pstuts`) was assessed using the same RAGAS framework and "Golden Data Set" (`golden_small_hf`) as the baseline.
|
113 |
+
|
114 |
+
**1. Comparative RAGAS Results 📊:** (Source: `notebooks/evaluate_rag.ipynb` output)
|
115 |
+
|
116 |
+
The notebook provides a comparison between "Base", "SOTA" (OpenAI's `text-embedding-3-small`), and "FT" (our fine-tuned `mbudisic/snowflake-arctic-embed-s-ft-pstuts`) models.
|
117 |
+
|
118 |
+
| Metric | Base (Initial) | FT (Fine-Tuned) | Change FT vs Base |
|
119 |
+
|------------------------|----------------|-----------------|-------------------|
|
120 |
+
| Faithfulness | 0.721 | 0.748 | +0.027 |
|
121 |
+
| Answer Relevancy | 0.914 | 0.819 | -0.095 |
|
122 |
+
| Context Recall | 0.672 | 0.672 | 0.000 |
|
123 |
+
| Factual Correctness | 0.654 | 0.598 | -0.056 |
|
124 |
+
| Context Entity Recall | 0.636 | 0.636 | 0.000 |
|
125 |
+
|
126 |
+
*(Note: These are mean scores. `Factual Correctness` is `factual_correctness(mode=f1)` in the notebook.)*
|
127 |
+
|
128 |
+
**2. Conclusions on Fine-Tuned Performance & Future Changes 🚀:**
|
129 |
+
|
130 |
+
* **Impact of Fine-Tuning:**
|
131 |
+
* **Faithfulness (+0.027):** A slight improvement, suggesting answers from the fine-tuned model are marginally more grounded in the retrieved context.
|
132 |
+
* **Answer Relevancy (-0.095):** Surprisingly, answer relevancy decreased. This might indicate that while the fine-tuned model is better at finding *technically* similar content based on Photoshop jargon, the overall answer framing by the LLM became less aligned with the user's original question intent compared to the broader base model.
|
133 |
+
* **Context Recall (No Change):** The ability to retrieve all necessary information did not change. The notebook itself notes: "What we see is that there is no difference in context recall... My guess is that this result has to do with the specific application. These were audio transcripts of fairly short videos. Most transcripts therefore fit completely into a single, or a few, chunks... even a base embedding model likely did as good of a job as it could."
|
134 |
+
* **Factual Correctness (-0.056):** This also saw a decrease, which is concerning and counter-intuitive for a fine-tuning step aimed at domain specificity.
|
135 |
+
* **Overall Assessment of Fine-Tuning:** The fine-tuning of `Snowflake/snowflake-arctic-embed-s` showed mixed results. While faithfulness slightly improved, the key metrics of answer relevancy and factual correctness unexpectedly declined. Context recall remained unchanged, which the notebook speculates might be due to the nature of the data (short, distinct transcripts). The notebook author concludes: "So, in the end, the conclusion is that the embedding model is not the right spot to optimize this RAG chain." for this specific dataset and base embedding model.
|
136 |
+
* **Expected Changes & Future Improvements:**
|
137 |
+
1. **Re-evaluate Fine-Tuning Strategy:** Given the results, the fine-tuning approach for embeddings needs review. This could involve:
|
138 |
+
* Trying a different base model for fine-tuning (perhaps a larger one, or one known for better transfer learning on smaller datasets).
|
139 |
+
* Augmenting the fine-tuning dataset or using different data generation strategies.
|
140 |
+
* Adjusting fine-tuning hyperparameters.
|
141 |
+
2. **Prompt Engineering:** Focus on refining the prompts used for the LLM agents (supervisor, RAG agent) to better guide answer synthesis, potentially improving factual correctness and answer relevancy irrespective of embedding model changes.
|
142 |
+
3. **Advanced RAG Techniques:** Explore techniques like re-ranking retrieved documents, query transformations, or hypothetical document embeddings (HyDE) to improve the quality and relevance of context fed to the LLM.
|
143 |
+
4. **LLM for Generation:** Experiment with different LLMs for the answer generation step. The `evaluate_rag.ipynb` uses `gpt-4.1-nano` for the LLM in RAG chains and `gpt-4.1-mini` for the evaluator LLM. The main `app.py` uses `gpt-4.1-mini`. Consistency or using a more powerful generation model might yield better results.
|
144 |
+
5. **Iterative Evaluation:** Continue using the RAGAS framework on the golden dataset to meticulously track the impact of each change.
|
145 |
+
|
146 |
+
This concludes the update to `ANSWER.md` based on your instructions.
|
pstuts_rag/CERT_SUBMISSION.md
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Task 1: Defining your Problem and Audience
|
2 |
+
|
3 |
+
**You are an AI Solutions Engineer**.
|
4 |
+
|
5 |
+
**What** problem do you want to solve? **Who** is it a problem for?
|
6 |
+
|
7 |
+
<aside>
|
8 |
+
📝
|
9 |
+
|
10 |
+
Task 1: Articulate the problem and the user of your application
|
11 |
+
|
12 |
+
*Hints:*
|
13 |
+
|
14 |
+
- *Create a list of potential questions that your user is likely to ask!*
|
15 |
+
- *What is the user’s job title, and what is the part of their job function that you’re trying to automate?*
|
16 |
+
</aside>
|
17 |
+
|
18 |
+
**✅ Deliverables**
|
19 |
+
|
20 |
+
1. Write a succinct 1-sentence description of the problem
|
21 |
+
2. Write 1-2 paragraphs on why this is a problem for your specific user
|
22 |
+
|
23 |
+
<aside>
|
24 |
+
⚠️
|
25 |
+
|
26 |
+
**If you cannot come up with a problem worth solving, use this one as a default**.
|
27 |
+
|
28 |
+
**⚖️ Default Problem**: *Legal documents are too hard to understand for average people*
|
29 |
+
|
30 |
+
Default Solution: Build a fine-tuned, agentic RAG application that can answer questions in simple language about a court case based on source documents and additional relevant retrieved information
|
31 |
+
|
32 |
+
</aside>
|
33 |
+
|
34 |
+
# Task 2: Propose a Solution
|
35 |
+
|
36 |
+
Now that you’ve defined a problem and a user, *there are many possible solutions*.
|
37 |
+
|
38 |
+
Choose one, and articulate it.
|
39 |
+
|
40 |
+
<aside>
|
41 |
+
📝
|
42 |
+
|
43 |
+
Task 2: Articulate your proposed solution
|
44 |
+
|
45 |
+
*Hint:*
|
46 |
+
|
47 |
+
- *Paint a picture of the “better world” that your user will live in. How will they save time, make money, or produce higher-quality output?*
|
48 |
+
- *Recall the [LLM Application stack](https://a16z.com/emerging-architectures-for-llm-applications/) we’ve discussed at length*
|
49 |
+
</aside>
|
50 |
+
|
51 |
+
**✅ Deliverables**
|
52 |
+
|
53 |
+
1. Write 1-2 paragraphs on your proposed solution. How will it look and feel to the user?
|
54 |
+
2. Describe the tools you plan to use in each part of your stack. Write one sentence on why you made each tooling choice.
|
55 |
+
1. LLM
|
56 |
+
2. Embedding Model
|
57 |
+
3. Orchestration
|
58 |
+
4. Vector Database
|
59 |
+
5. Monitoring
|
60 |
+
6. Evaluation
|
61 |
+
7. User Interface
|
62 |
+
8. (Optional) Serving & Inference
|
63 |
+
3. Where will you use an agent or agents? What will you use “agentic reasoning” for in your app?
|
64 |
+
|
65 |
+
# Task 3: Dealing with the Data
|
66 |
+
|
67 |
+
**You are an AI Systems Engineer.** The AI Solutions Engineer has handed off the plan to you. Now *you must identify some source data* that you can use for your application.
|
68 |
+
|
69 |
+
Assume that you’ll be doing at least RAG (e.g., a PDF) with a general agentic search (e.g., a search API like [Tavily](https://tavily.com/) or [SERP](https://serpapi.com/)).
|
70 |
+
|
71 |
+
Do you also plan to do fine-tuning or alignment? Should you collect data, use Synthetic Data Generation, or use an off-the-shelf dataset from [HF Datasets](https://huggingface.co/docs/datasets/en/index) or [Kaggle](https://www.kaggle.com/datasets)?
|
72 |
+
|
73 |
+
<aside>
|
74 |
+
📝
|
75 |
+
|
76 |
+
Task 3: Collect data for (at least) RAG and choose (at least) one external API
|
77 |
+
|
78 |
+
*Hint:*
|
79 |
+
|
80 |
+
- *Ask other real people (ideally the people you’re building for!) what they think.*
|
81 |
+
- *What are the specific questions that your user is likely to ask of your application? **Write these down**.*
|
82 |
+
</aside>
|
83 |
+
|
84 |
+
**✅ Deliverables**
|
85 |
+
|
86 |
+
1. Describe all of your data sources and external APIs, and describe what you’ll use them for.
|
87 |
+
2. Describe the default chunking strategy that you will use. Why did you make this decision?
|
88 |
+
3. [Optional] Will you need specific data for any other part of your application? If so, explain.
|
89 |
+
|
90 |
+
# Task 4: Building a Quick End-to-End Prototype
|
91 |
+
|
92 |
+
<aside>
|
93 |
+
📝
|
94 |
+
|
95 |
+
Task 4: Build an end-to-end RAG application using an industry-standard open-source stack and your choice of commercial off-the-shelf models
|
96 |
+
|
97 |
+
</aside>
|
98 |
+
|
99 |
+
**✅ Deliverables**
|
100 |
+
|
101 |
+
1. Build an end-to-end prototype and deploy it to a Hugging Face Space (or other endpoint)
|
102 |
+
|
103 |
+
# Task 5: Creating a Golden Test Data Set
|
104 |
+
|
105 |
+
**You are an AI Evaluation & Performance Engineer.** The AI Systems Engineer who built the initial RAG system has asked for your help and expertise in creating a "Golden Data Set" for evaluation.
|
106 |
+
|
107 |
+
<aside>
|
108 |
+
📝
|
109 |
+
|
110 |
+
Task 5: Generate a synthetic test data set to baseline an initial evaluation with RAGAS
|
111 |
+
|
112 |
+
</aside>
|
113 |
+
|
114 |
+
**✅ Deliverables**
|
115 |
+
|
116 |
+
1. Assess your pipeline using the RAGAS framework including key metrics faithfulness, response relevance, context precision, and context recall. Provide a table of your output results.
|
117 |
+
2. What conclusions can you draw about the performance and effectiveness of your pipeline with this information?
|
118 |
+
|
119 |
+
# Task 6: Fine-Tuning Open-Source Embeddings
|
120 |
+
|
121 |
+
**You are a Machine Learning Engineer.** The AI Evaluation and Performance Engineer has asked for your help to fine-tune the embedding model.
|
122 |
+
|
123 |
+
<aside>
|
124 |
+
📝
|
125 |
+
|
126 |
+
Task 6: Generate synthetic fine-tuning data and complete fine-tuning of the open-source embedding model
|
127 |
+
|
128 |
+
</aside>
|
129 |
+
|
130 |
+
**✅ Deliverables**
|
131 |
+
|
132 |
+
1. Swap out your existing embedding model for the new fine-tuned version. Provide a link to your fine-tuned embedding model on the Hugging Face Hub.
|
133 |
+
|
134 |
+
# Task 7: Assessing Performance
|
135 |
+
|
136 |
+
**You are the AI Evaluation & Performance Engineer**. It's time to assess all options for this product.
|
137 |
+
|
138 |
+
<aside>
|
139 |
+
📝
|
140 |
+
|
141 |
+
Task 7: Assess the performance of the fine-tuned agentic RAG application
|
142 |
+
|
143 |
+
</aside>
|
144 |
+
|
145 |
+
**✅ Deliverables**
|
146 |
+
|
147 |
+
1. How does the performance compare to your original RAG application? Test the fine-tuned embedding model using the RAGAS frameworks to quantify any improvements. Provide results in a table.
|
148 |
+
2. Articulate the changes that you expect to make to your app in the second half of the course. How will you improve your application?
|
149 |
+
|
150 |
+
# Your Final Submission
|
151 |
+
|
152 |
+
Please include the following in your final submission:
|
153 |
+
|
154 |
+
1. A public (or otherwise shared) link to a **GitHub repo** that contains:
|
155 |
+
1. A 5-minute (OR LESS) loom video of a live **demo of your application** that also describes the use case.
|
156 |
+
2. A **written document** addressing each deliverable and answering each question
|
157 |
+
3. All relevant code
|
158 |
+
2. A public (or otherwise shared) link to the **final version of your public application** on Hugging Face (or other)
|
159 |
+
3. A public link to your **fine-tuned embedding model** on Hugging Face
|