# Retrieval Augmented Generation

**URL:** https://community.deeplearning.ai/c/course-q-a/retrieval-augmented-generation/539.md?page=1

[Latest](https://community.deeplearning.ai/latest.md) · [Categories](https://community.deeplearning.ai/categories.md) · [Tags](https://community.deeplearning.ai/tags.md)

**Page:** 2

---

## [Query regarding TF-IDF calculation](https://community.deeplearning.ai/t/query-regarding-tf-idf-calculation/892827)

<div class="topic-metadata">

**Author:** [@Rhythm\_Dutta](https://community.deeplearning.ai/u/Rhythm_Dutta)\
**Replies:** 2\
**Last updated:** [June 13, 2026, 6:21pm UTC](https://community.deeplearning.ai/t/query-regarding-tf-idf-calculation/892827 "2026-06-13T18:21:46Z")

</div>

A doubt on how exactly do we calculate the tf-idf score for a document. As per the the course slide we calculate the tf for each doc and normalize them. We calculate the idf of each word as mentioned. All good. But my qu…

---

## [C1M3 Assignment - how to run locally?](https://community.deeplearning.ai/t/c1m3-assignment-how-to-run-locally/864349)

<div class="topic-metadata">

**Author:** [@dougdonohoe](https://community.deeplearning.ai/u/dougdonohoe)\
**Replies:** 11\
**Last updated:** [June 7, 2026, 4:20pm UTC](https://community.deeplearning.ai/t/c1m3-assignment-how-to-run-locally/864349 "2026-06-07T16:20:24Z")

</div>

I’m trying to run the Module 3 assignment locally, but need to load the BBC data into the vector database. This code isn’t provided. I tried this code, adapted from the previous lab… from weaviate.classes.config impor…

---

## [C1M4 Ungraded Lab : top\_p = 0 does not produce identical output](https://community.deeplearning.ai/t/c1m4-ungraded-lab-top-p-0-does-not-produce-identical-output/866675)

<div class="topic-metadata">

**Author:** [@achhotray](https://community.deeplearning.ai/u/achhotray)\
**Replies:** 4\
**Last updated:** [June 3, 2026, 2:32pm UTC](https://community.deeplearning.ai/t/c1m4-ungraded-lab-top-p-0-does-not-produce-identical-output/866675 "2026-06-03T14:32:49Z")

</div>

Hey all, I am going through the ungraded labs (Module 4 : Exploring LLM capabilities) and am at Section 3.2 (Nucleus or top-p sampling). When I run the cells with top\_p = 0, I am expecting the three outputs to be the sam…

---

## [C1M3\_Assignment problem](https://community.deeplearning.ai/t/c1m3-assignment-problem/892460)

<div class="topic-metadata">

**Author:** [@Sudhir\_Dudwadkar](https://community.deeplearning.ai/u/Sudhir_Dudwadkar)\
**Replies:** 2\
**Last updated:** [May 27, 2026, 2:53am UTC](https://community.deeplearning.ai/t/c1m3-assignment-problem/892460 "2026-05-27T02:53:17Z")

</div>

filter\_by\_metadata function returns more than 2 objects, even though the default=5. My test fails.

---

## [Encountered error during graded exercie](https://community.deeplearning.ai/t/encountered-error-during-graded-exercie/892363)

<div class="topic-metadata">

**Author:** [@Sudhir\_Dudwadkar](https://community.deeplearning.ai/u/Sudhir_Dudwadkar)\
**Replies:** 3\
**Last updated:** [May 22, 2026, 3:20am UTC](https://community.deeplearning.ai/t/encountered-error-during-graded-exercie/892363 "2026-05-22T03:20:44Z")

</div>

my code: Codes removed by mentor as posting any grade function codes is considered against code of conduct. if a mentor wants to look at your codes they will ask you to send the code screenshot by personal DM, until the…

---

## [Graded Lab Constantly Fails — "collection" not defined error](https://community.deeplearning.ai/t/graded-lab-constantly-fails-collection-not-defined-error/892228)

<div class="topic-metadata">

**Author:** [@Huzaifa4](https://community.deeplearning.ai/u/Huzaifa4)\
**Replies:** 5\
**Last updated:** [May 15, 2026, 5:46pm UTC](https://community.deeplearning.ai/t/graded-lab-constantly-fails-collection-not-defined-error/892228 "2026-05-15T17:46:45Z")

</div>

I have tried resubmitting and restarting the Graded Lab for Module 3 multiple times, but it fails each time with the following error for each of the 5 parts: There was a problem compiling the code from your notebook, pl…

---

## [Module 4, Graded code assignment – errors in exercise 2 and 5](https://community.deeplearning.ai/t/module-4-graded-code-assignment-errors-in-exercise-2-and-5/892152)

<div class="topic-metadata">

**Author:** [@Konstantin\_L1](https://community.deeplearning.ai/u/Konstantin_L1)\
**Replies:** 3\
**Last updated:** [May 14, 2026, 6:51pm UTC](https://community.deeplearning.ai/t/module-4-graded-code-assignment-errors-in-exercise-2-and-5/892152 "2026-05-14T18:51:05Z")

</div>

Dear All, I need help. I have done the grade code assignment, in jupyter notebook for all 5 exercies it says – “All test passed”, but when I click on “Submit” I get error for part 2 and part 5. I thought I have occasion…

---

## [Issue with executing Module 5 graded assignment](https://community.deeplearning.ai/t/issue-with-executing-module-5-graded-assignment/892028)

<div class="topic-metadata">

**Author:** [@yyang85](https://community.deeplearning.ai/u/yyang85)\
**Replies:** 2\
**Last updated:** [May 8, 2026, 2:49am UTC](https://community.deeplearning.ai/t/issue-with-executing-module-5-graded-assignment/892028 "2026-05-08T02:49:39Z")

</div>

Hello team, When I try to run Exercise 1 of Module 5’s graded assignment, I got this following error that’s unrelated to the code I completed, as it still appears even when I changed simplified to False in the unit test…

---

## [C1M4: No feedback available for this exercise. for Part2, 4 and Part 5 says](https://community.deeplearning.ai/t/c1m4-no-feedback-available-for-this-exercise-for-part2-4-and-part-5-says/892019)

<div class="topic-metadata">

**Author:** [@Rajat\_Aggarwal3](https://community.deeplearning.ai/u/Rajat_Aggarwal3)\
**Replies:** 5\
**Last updated:** [May 5, 2026, 2:03pm UTC](https://community.deeplearning.ai/t/c1m4-no-feedback-available-for-this-exercise-for-part2-4-and-part-5-says/892019 "2026-05-05T14:03:21Z")

</div>

I am able to run code with prompt successfully. I tried some random queries as well, end to end RAG pipeline is working well. But after submitting assignment for evaluation, its showing Score 20/50. Part-1: 10/10 Part-…

---

## [Module 3 graded code assignment - error importing flask](https://community.deeplearning.ai/t/module-3-graded-code-assignment-error-importing-flask/891897)

<div class="topic-metadata">

**Author:** [@Joao\_Carlos\_Breda\_dos\_Santos](https://community.deeplearning.ai/u/Joao_Carlos_Breda_dos_Santos)\
**Replies:** 1\
**Last updated:** [April 30, 2026, 4:31pm UTC](https://community.deeplearning.ai/t/module-3-graded-code-assignment-error-importing-flask/891897 "2026-04-30T16:31:00Z")

</div>

In the assignmnet, on “1 - Loading the libraries”, i’m getting erros runing the second cel. When importing “flask\_app” i’m getiing the following error: "OSError: \[Errno 30\] Read-only file system: ‘.models/.locks/models…

---

## [Ordering of Search (keyword & semantic) and Metadata Filter](https://community.deeplearning.ai/t/ordering-of-search-keyword-semantic-and-metadata-filter/891718)

<div class="topic-metadata">

**Author:** [@Shourav\_Chakravarti](https://community.deeplearning.ai/u/Shourav_Chakravarti)\
**Replies:** 1\
**Last updated:** [April 22, 2026, 12:56pm UTC](https://community.deeplearning.ai/t/ordering-of-search-keyword-semantic-and-metadata-filter/891718 "2026-04-22T12:56:01Z")

</div>

The screenshot below from the Hybrid Search video in the Retrieval Augmented Generation course shows that the metadata filter is applied on the results of the two search methods. Since the searches are much more computat…

---

## [How to Evaluate a Self-Evaluating RAG System using DeepEval / RAGAS with a Golden Dataset?](https://community.deeplearning.ai/t/how-to-evaluate-a-self-evaluating-rag-system-using-deepeval-ragas-with-a-golden-dataset/891712)

<div class="topic-metadata">

**Author:** [@Dhruv\_06](https://community.deeplearning.ai/u/Dhruv_06)\
**Replies:** 1\
**Last updated:** [April 21, 2026, 11:52pm UTC](https://community.deeplearning.ai/t/how-to-evaluate-a-self-evaluating-rag-system-using-deepeval-ragas-with-a-golden-dataset/891712 "2026-04-21T23:52:19Z")

</div>

Hi everyone, I’ve built a Self-Evaluating RAG System using LangChain, ChromaDB, BM25 hybrid retrieval, query rewriting, and cross-encoder reranking, with LLaMA 3.3 70B via Groq as the LLM. I’m trying to evaluate it usi…

---

## [Graph RAG after RAG](https://community.deeplearning.ai/t/graph-rag-after-rag/891547)

<div class="topic-metadata">

**Author:** [@Mohamed\_Abdelhameed\_Fakhry](https://community.deeplearning.ai/u/Mohamed_Abdelhameed_Fakhry)\
**Replies:** 1\
**Last updated:** [April 17, 2026, 11:28am UTC](https://community.deeplearning.ai/t/graph-rag-after-rag/891547 "2026-04-17T11:28:44Z")

</div>

I wanna learn graph RAG ASAP Do I need to go through traditional RAG first or I can step to Graph RAG I need it for my graduation project

---

## [Bug: Video player is not working](https://community.deeplearning.ai/t/bug-video-player-is-not-working/891119)

<div class="topic-metadata">

**Author:** [@Shavvy](https://community.deeplearning.ai/u/Shavvy)\
**Replies:** 4\
**Last updated:** [April 4, 2026, 5:40pm UTC](https://community.deeplearning.ai/t/bug-video-player-is-not-working/891119 "2026-04-04T17:40:58Z")

</div>

My issue is that the video player is not working (always stuck on “pause” mode). I tried refreshing, logging in/out, and clearing cache, but the issue persists. When accessing the course from a different browser the vi…

---

## [Who is this course intended for](https://community.deeplearning.ai/t/who-is-this-course-intended-for/890908)

<div class="topic-metadata">

**Author:** [@Nishanth.J](https://community.deeplearning.ai/u/Nishanth.J)\
**Replies:** 1\
**Last updated:** [March 27, 2026, 7:39am UTC](https://community.deeplearning.ai/t/who-is-this-course-intended-for/890908 "2026-03-27T07:39:57Z")

</div>

Can a Mathematics graduate take this course? In the first module lab, it directly introduces OpenAI and the DefaultHttpxClient. If not, what prerequisites are required before starting this course?

---

## [C1M3\_Assignment cell\[27\] BadRequestError: Error code: 400](https://community.deeplearning.ai/t/c1m3-assignment-cell-27-badrequesterror-error-code-400/890588)

<div class="topic-metadata">

**Author:** [@aravindagn](https://community.deeplearning.ai/u/aravindagn)\
**Replies:** 5\
**Last updated:** [March 26, 2026, 3:21pm UTC](https://community.deeplearning.ai/t/c1m3-assignment-cell-27-badrequesterror-error-code-400/890588 "2026-03-26T15:21:20Z")

</div>

C1M3\_Assignment when running cell\[27\] got following error BadRequestError: Error code: 400 - {‘id’: ‘obief7X-2kFHot-9deec4243e4f58f1’, ‘error’: {‘message’: ‘Unable to access non-serverless model meta-llama/Meta-Llama-3.…

---

## [Getting WeaviateStartUpError in C1M3\_Ungraded\_Lab\_2 notebook](https://community.deeplearning.ai/t/getting-weaviatestartuperror-in-c1m3-ungraded-lab-2-notebook/887741)

<div class="topic-metadata">

**Author:** [@Bhakti](https://community.deeplearning.ai/u/Bhakti)\
**Replies:** 2\
**Last updated:** [March 25, 2026, 12:02pm UTC](https://community.deeplearning.ai/t/getting-weaviatestartuperror-in-c1m3-ungraded-lab-2-notebook/887741 "2026-03-25T12:02:52Z")

</div>

While running 4.3 Loading Chunks into a Vector Database section in C1M3\_Ungraded\_Lab\_2 I’m getting below error - WeaviateStartUpError: Embedded DB did not start because processes are already listening on ports http:807…

---

## [C1M2 Exercise 2 Error](https://community.deeplearning.ai/t/c1m2-exercise-2-error/890732)

<div class="topic-metadata">

**Author:** [@Rajeev\_Joshi](https://community.deeplearning.ai/u/Rajeev_Joshi)\
**Replies:** 2\
**Last updated:** [March 23, 2026, 6:04pm UTC](https://community.deeplearning.ai/t/c1m2-exercise-2-error/890732 "2026-03-23T18:04:03Z")

</div>

Hi, While executing below shell, I am getting error and I am not able to submit 2nd Exercise. Appreciate any help in this regard. model\_name = os.path.join(os.environ\[‘MODEL\_PATH’\],“BAAI/bge-base-en-v1.5” ) model = Se…

---

## [Problem compiling the code - Implementing Retriever Functions in a RAG System - C1M2](https://community.deeplearning.ai/t/problem-compiling-the-code-implementing-retriever-functions-in-a-rag-system-c1m2/883614)

<div class="topic-metadata">

**Author:** [@lintuyau](https://community.deeplearning.ai/u/lintuyau)\
**Replies:** 16\
**Last updated:** [March 23, 2026, 4:48pm UTC](https://community.deeplearning.ai/t/problem-compiling-the-code-implementing-retriever-functions-in-a-rag-system-c1m2/883614 "2026-03-23T16:48:45Z")

</div>

Hello, While grading the assignment “C1M2 - Implementing Retriever Functions in a RAG System“, the following error is obtained for all 3 exercises: ‘There was a problem compiling the code from your notebook, please chec…

---

## [C1M4\_Assignment 4.3 Filtering by metadata (NOT GRADED Cell of graded lab). A quick suggestion about the filter logic 🤔](https://community.deeplearning.ai/t/c1m4-assignment-4-3-filtering-by-metadata-not-graded-cell-of-graded-lab-a-quick-suggestion-about-the-filter-logic/890694)

<div class="topic-metadata">

**Author:** [@ulyaaliyeva206](https://community.deeplearning.ai/u/ulyaaliyeva206)\
**Replies:** 2\
**Last updated:** [March 22, 2026, 8:04pm UTC](https://community.deeplearning.ai/t/c1m4-assignment-4-3-filtering-by-metadata-not-graded-cell-of-graded-lab-a-quick-suggestion-about-the-filter-logic/890694 "2026-03-22T20:04:06Z")

</div>

Hello everyone again ! :waving\_hand: :smiley: While going through the code for the get\_relevant\_products\_from\_query function, I noticed a few tiny details and wanted to kindly ask :smiling\_face: for some clarification …

---

## [C1M3 ungraded lab .Possible bug: overlap implementation doesn't match section 2.2 diagram](https://community.deeplearning.ai/t/c1m3-ungraded-lab-possible-bug-overlap-implementation-doesnt-match-section-2-2-diagram/890679)

<div class="topic-metadata">

**Author:** [@ulyaaliyeva206](https://community.deeplearning.ai/u/ulyaaliyeva206)\
**Replies:** 3\
**Last updated:** [March 22, 2026, 3:48pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-possible-bug-overlap-implementation-doesnt-match-section-2-2-diagram/890679 "2026-03-22T15:48:21Z")

</div>

Hi everyone, I’m currently going through the RAG course and noticed something in the get\_chunks\_fixed\_size\_with\_overlap function that I’d like to clarify. In the current implementation, the loop steps by chunk\_size, bu…

---

## [C1M3 ungraded lab mixed\_chunking() docstring is a little bit misleading :)](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680)

<div class="topic-metadata">

**Author:** [@ulyaaliyeva206](https://community.deeplearning.ai/u/ulyaaliyeva206)\
**Replies:** 3\
**Last updated:** [March 22, 2026, 3:37pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-mixed-chunking-docstring-is-a-little-bit-misleading/890680 "2026-03-22T15:37:01Z")

</div>

Hey all! :waving\_hand: Loving the course! Quick note on mixed\_chunking :memo: The docstring says: “larger chunks can be further split at the middle or specific markers” But the code only handles small chunks (mergi…

---

## [C1M3 ungraded lab 1 error with Configure function](https://community.deeplearning.ai/t/c1m3-ungraded-lab-1-error-with-configure-function/890527)

<div class="topic-metadata">

**Author:** [@sushic](https://community.deeplearning.ai/u/sushic)\
**Replies:** 1\
**Last updated:** [March 18, 2026, 5:19pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-1-error-with-configure-function/890527 "2026-03-18T17:19:29Z")

</div>

Getting the error below on section 2.2 of the first ungraded lab in Module 3 - it seems the ‘Configure’ function hasn’t been defined anywhere?

---

## [Retrieval Augmented Generation M4 & M5 - InvalidRequestError in the graded Labs](https://community.deeplearning.ai/t/retrieval-augmented-generation-m4-m5-invalidrequesterror-in-the-graded-labs/890460)

<div class="topic-metadata">

**Author:** [@Mohammed\_HAJJARI](https://community.deeplearning.ai/u/Mohammed_HAJJARI)\
**Replies:** 18\
**Last updated:** [March 18, 2026, 12:18am UTC](https://community.deeplearning.ai/t/retrieval-augmented-generation-m4-m5-invalidrequesterror-in-the-graded-labs/890460 "2026-03-18T00:18:23Z")

</div>

I encountered an error while attempting to generate a response using the meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo model via the Together API. The request fails with the following error: InvalidRequestError: Error co…

---

## [Error in Graded Assignment C1M4 assignment](https://community.deeplearning.ai/t/error-in-graded-assignment-c1m4-assignment/890376)

<div class="topic-metadata">

**Author:** [@Anjan1970](https://community.deeplearning.ai/u/Anjan1970)\
**Replies:** 5\
**Last updated:** [March 17, 2026, 9:00pm UTC](https://community.deeplearning.ai/t/error-in-graded-assignment-c1m4-assignment/890376 "2026-03-17T21:00:52Z")

</div>

Hi, I’m getting error, despite restoring the original version: Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF\_TOKEN to enable higher rate limits and faster downloads. Could not cache n…

---

## [Multiple issues with graded assignment in RAG M5 module](https://community.deeplearning.ai/t/multiple-issues-with-graded-assignment-in-rag-m5-module/890404)

<div class="topic-metadata">

**Author:** [@Nikhil9018](https://community.deeplearning.ai/u/Nikhil9018)\
**Replies:** 12\
**Last updated:** [March 17, 2026, 8:46pm UTC](https://community.deeplearning.ai/t/multiple-issues-with-graded-assignment-in-rag-m5-module/890404 "2026-03-17T20:46:14Z")

</div>

Thanks to the team for actively reviewing and responding to issues raised in this forum. I am currently facing multiple issues while working on Assignment #5 and this is blocking my progress, requesting support to revie…

---

## [C1M5 Error code: 400 - {"message": "Unable to access non-serverless model meta-llama/Llama-3.2-3B-Instruct-Turbo](https://community.deeplearning.ai/t/c1m5-error-code-400-message-unable-to-access-non-serverless-model-meta-llama-llama-3-2-3b-instruct-turbo/890014)

<div class="topic-metadata">

**Author:** [@kalyansri2508](https://community.deeplearning.ai/u/kalyansri2508)\
**Replies:** 16\
**Last updated:** [March 17, 2026, 8:07pm UTC](https://community.deeplearning.ai/t/c1m5-error-code-400-message-unable-to-access-non-serverless-model-meta-llama-llama-3-2-3b-instruct-turbo/890014 "2026-03-17T20:07:14Z")

</div>

I am getting the following error when I am trying the graded assignment in Module 5. I use DeepLearning.AI Error code: 400 - {“message”: “Unable to access non-serverless model meta-llama/Llama-3.2-3B-Instruct-Turbo. Plea…

---

## [Possible error in code assignement evaluation](https://community.deeplearning.ai/t/possible-error-in-code-assignement-evaluation/890422)

<div class="topic-metadata">

**Author:** [@HGE](https://community.deeplearning.ai/u/HGE)\
**Replies:** 2\
**Last updated:** [March 17, 2026, 4:32pm UTC](https://community.deeplearning.ai/t/possible-error-in-code-assignement-evaluation/890422 "2026-03-17T16:32:24Z")

</div>

Hello, It seems that there is an error in the code assignment evaluation: “failed test case: output has wrong length when using top\_k=3. expected: 3, but got: 5.”, but it is supposed to be 5, and the outcome was identic…

---

## [C1M3\_Ungraded\_Lab\_2 cell\[31\] InvalidRequestError: Error code: 400](https://community.deeplearning.ai/t/c1m3-ungraded-lab-2-cell-31-invalidrequesterror-error-code-400/890420)

<div class="topic-metadata">

**Author:** [@aravindagn](https://community.deeplearning.ai/u/aravindagn)\
**Replies:** 2\
**Last updated:** [March 17, 2026, 3:27pm UTC](https://community.deeplearning.ai/t/c1m3-ungraded-lab-2-cell-31-invalidrequesterror-error-code-400/890420 "2026-03-17T15:27:37Z")

</div>

When running C1M3\_Ungraded\_Lab\_2 cell\[31\] getting following error InvalidRequestError: Error code: 400 - {"message": "Unable to access non-serverless model meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo. Please visit https…

---

## [Hi I can't download the slides. When I click the links it says "This site can't be reached"](https://community.deeplearning.ai/t/hi-i-cant-download-the-slides-when-i-click-the-links-it-says-this-site-cant-be-reached/888830)

<div class="topic-metadata">

**Author:** [@Sophie668](https://community.deeplearning.ai/u/Sophie668)\
**Replies:** 11\
**Last updated:** [March 17, 2026, 8:05am UTC](https://community.deeplearning.ai/t/hi-i-cant-download-the-slides-when-i-click-the-links-it-says-this-site-cant-be-reached/888830 "2026-03-17T08:05:10Z")

</div>

Hi I can’t download the slides. When I click the links it says “This site can’t be reached”.

[Previous page](https://community.deeplearning.ai/c/course-q-a/retrieval-augmented-generation/539.md)

[Next page](https://community.deeplearning.ai/c/course-q-a/retrieval-augmented-generation/539.md?page=2)
