I am finishing the final assessment of Deep Learning Institute course ‘Building RAG Agents
for LLMs’.
However, although I successfully launched basic_chat, retriever and generator models to 9012 port and able to generate response locally, when run the evaluation script server_app.py, it could not start Gradio UI, it only shows ‘Starting FastAPI app’.
Therefore, when assess task, it shows ‘it does not look like you completed the assessment yet’.
I need some technical support to debug the issue, in order to pass the assessment. dli#rag
Sorry about the delay! server_app.py is running perpetually in another microservice and the UI should be getting exposed to a port (:8090 I think). From there, you should be hitting the evaluate button to execute the script. Does this help?
I successfully got Gradio run, and passed all the evaluation questions, as screenshot attached.
The chatbot showed ‘Congrats! You passed the assessment!’.
However, when assessed task, it still showed the same issue.
Could you please to clarify why Gradio UI and environment assess task results are not align?
Awesome! Did you kickstart the service yourself, or are you using the one perpetually open at <course_url>:8090? If you started it yourself, then the # secret line is still just a comment, hence passing the test does nothing. The running frontend microservice has some actual commands that run in place of that one.
If you’re curious how this is achieved:
mod: ## Modifier service. Does nothing in dev. Removes solution component in prod
container_name: modifier
context: notebooks/docker_router
dockerfile: Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./notebooks/:/notebooks/
depends_on:
- "frontend"
command: >
sed -i -e 's:code_that_does_something():## secret:g' /notebooks/frontend/server_app.py
Example: If your course environment url is http://blablabla.aws.labs.courses.nvidia.com/lab/lab, then frontend should be running on http://blablabla.aws.labs.courses.nvidia.com:8090
Heyo! There’s a number of things that could be happening. I’d need more information about the surrounding context to be of much help. The issue is definitely stemming from the fact that the history is getting corrupted (maybe one of your chains is returning none, or maybe your generator chain isn’t quite there). Can you provide some more context?
The tip on the assessment is to check over the frontend code and see what exactly needs to be deployed for your remoterunnable to properly slot into the frontend-side orchestration.
This error is happening only when “RAG” chain is activate on Gradio app. I tried a lot of solutions, like changing add_message, add_text, bot and I tried to change the retrieval_chain, but without success.
Some error is happening on
chains_dict[‘retriever’]
This is probably where things are breaking. The second argument is what is going to be received on the front end, effectively meaning that every RemoteRunnable in the microservice is trying to pass through your ChatNVIDIA LLM. This is sufficient for basic_chat but insufficient for both generator and retriever.
Hello @vkudlay I saw a lot of implementation required for application, the context_getter on “/retriever” and the llm_gen for “/generator”, and I modified a lot on retrievier chain and output_chain, but when I think was finishing the course, sadly I got this message:
Awesome! Time has been added. Feel free to delete the post with your creds. Does my comment above clear things up, or is there something else I can clarify?
See the earlier comment, and check out how the frontend is using your RemoteRunnable. The error is being generated from your generator endpoint since it’s expecting a ChatPromptTemplate response.
Hey @ricordo.yan.
My post above isn’t actually the solution (we’d rather the solution didn’t wind up in the forums lol). It just shows that the solution is supposed to look like. The retriever and generator components need to be properly implemented per the course instructions/as would be ingestible by frontend/server_app.py :D
Hello @vkudlay , I was able to figure out the error. However, when I paste the question and answer pair it keeps telling me please upload the fresh paper. What I am doing wrong here?
Hey @ricordo.yan, that issue has to do with the documents you loaded in in part 7. You need to make sure in that step that at least one of your papers has a last-modified date that it at most one month ago. Verify that at least two such “fresh” chunks are in your vectorstore/have been processed appropriately from part 7.
Hello @vkudlay , I passed the assessment and I completed all the course notebooks. However, the course completion just does not complete the circle. Will the certificate be sent to me by email? Thanks