DLI - Building RAG Agents with LLMs

when trying to complete the assessment- i get: "
“It doesn’t look like you’ve
completed the assessment
yet. Please make sure you have
completed the assessment notebook
in its entirety, then come back
and try again.”
can u assist? @vkudlay
i create the the new document into faiss and the notebook is working

Hello! Sounds like you’ve gone through notebooks 7 and 8, which also involved making a pipeline, exporting a faiss vectorstore, and evaluating the pipeline. The last step is to recreate this pipeline on the frontend side and run the evaluation. So just make a copy of langserve_35.ipynb and modify it to deliver the components to slot into the frontend logic:

## Necessary Endpoints
chains_dict = {
    'basic' : RemoteRunnable("http://lab:9012/basic_chat/"),
    'retriever' : RemoteRunnable("http://lab:9012/retriever/"),
    'generator' : RemoteRunnable("http://lab:9012/generator/"),
}

basic_chain = chains_dict['basic']


## Retrieval-Augmented Generation Chain

retrieval_chain = (
    {'input' : (lambda x: x)}
    | RunnableAssign(
        {'context' : itemgetter('input') 
        | chains_dict['retriever'] 
        | LongContextReorder().transform_documents
        | docs2str
    })
)

output_chain = RunnableAssign({"output" : chains_dict['generator'] }) | output_puller
rag_chain = retrieval_chain | output_chain

hi @vkudlay thanks but it still doesn’t work.
the code you attached is already in “\frontend\server_app.py”

i still get: “It doesn’t look like you’ve
completed the assessment
yet. Please make sure you have
completed the assessment notebook
in its entirety, then come back
and try again.”

@vkudlay
@brian.wu @AastaLLL @DaveYYY @Fiona.Chen
please note i’ve already did several dli courses and only on this i really dont understand how to continue
can u share the full solution or assist thanks

I receive the same message as user157430:

It doesn’t look like you’ve
completed the assessment
yet. Please make sure you have
completed the assessment notebook
in its entirety, then come back
and try again.

I have checked the correct operation of server_app.py locally (visual studio).

@Leandroai_24 can u assist? or u also didn’t able yet to complete it?
@vkudlay ?

Check notebooks 7 and 8, there are updates.

at the end of notebook 8 - when i press: “Link To Gradio Frontend” anff try the chat i get: “Gradio Stream failed: [Errno 111] Connection refused” anyway still get “Gradio Stream failed: [Errno 111] Connection refused”
should i run also more code? if so which code? @Leandroai_24 @vkudlay

As notebook 8 explains, you have to work and run the server (frontend/frontend_block.py) for the client to work correctly.

1 Like

I dont understand.
i’ve finished notebook7 (with the new article)
i’ve run also notebook8
at the end of notebook 8 - when i press: “Link To Gradio Frontend” anff try the chat i get: “Gradio Stream failed: [Errno 111] Connection refused” anyway still get “Gradio Stream failed: [Errno 111] Connection refused”

regarding: (frontend/frontend_block.py i cannot run it from the notebook
if i create a new notebook and paste its code there its not solving the problem
can u be more specific how i can complete the assesment?
@Leandroai_24 @vkudlay

Hey @user157430. Thanks for reaching out. A few notes:

  • The frontend is running perpetually; you’re not expected to manually restart it or otherwise modify frontend_server.py or frontend_block.py code.
  • To implement the functionality, you’d need to deploy several LangChain routes on port 9012 as shown in 35_langserve.ipynb. To sanity check, try running the cells in 35_langserve up to the FastAPI kickstart, and then see if the “basic” route in the frontend is working.
  • If it is working, then check out the source code of frontend_block.py to see what routes the frontend code is relying on and implement/launch them as appropriate.

Let me know if this clears it up a bit.

Hey @Leandroai_24. Sorry for the delay. Just wanted to make sure, is this still an issue? It sounds like you tried this out recently (following the new API Catalog update). Did you happen to kickstart a new frontend instance, or is this with the instance that’s running perpetually? I will do a quick run-through when I get home, so I’ll keep you posted.

@vkudlay When I was trying to pass the test I had worked on server_app.py, then I noticed updates and worked on frontend_block.py. I have already passed the test satisfactorily, and received the certificate, thank you.

Hi @vkudlay thanks for your reply.
again
sorry but I dont understand. i will try again to explain the current status

i’ve finished notebook7 (with the new article) - at notebook 7 i also added a new article the file saved ok.
i’ve run also notebook8 till it’s last cell.

but:

at the end of notebook 8 - when i press: “Link To Gradio Frontend” and try the chat i get: “Gradio Stream failed: [Errno 111] Connection refused” anyway still get “Gradio Stream failed: [Errno 111] Connection refused”

and when try to finish the ssesment the first mentioned not finished error message.
i saw your response but didn’t yet realized how to solve it.
can u be more specific what steps i need to do after it and before trying to finish it? thanks

@Leandroai_24 @vkudlay

@Leandroai_24 Awesome! Glad it worked out :D

@user157430 I see! Unfortunately, the closest I can get to explaining things is probably my post my message above + probably my post here: DLI Course ‘Building RAG Agents for LLMs’ - Assessment Support - DOCA / Storage. Some extra hints have bled out from previous discussions, so that’s one that had a lot more details.

Hi
if one of u can assist me in another thread or mail

@user157430 To finish the assessment, you should take what you’ve learned from notebooks 7 and 8 and go back to the end of Notebook 3 + the whole of Notebook 3.5. Your main workspace will be:

  • Notebook 3.5, which allows you to provide functionality via port :9012.
  • The frontend in :8090, which is powered by a running instance of frontend_blocks.py and frontend_server.py.

The challenge of the assessment is to understand: “how does the server_app.py file generated by Notebook 3.5 impact the interface presented by frontend_server.py, and what can I do to make it work properly.”

Hi @Leandroai_24 any chance you can assist me with that i didn’t maganged to finish this and im not sure what i missing here

Same problem here: Gradio Stream failed: [Errno 111] Connection refused” anyway still get “Gradio Stream failed: [Errno 111] Connection refused

Would love some feedback vkudlay… It’s a pity not to get the certificate bc of issues on the part of the stack that’s not relevant to the course…

Hey @pnmartinezz. Can you tell me what you have tried so far? Connection refused could just mean that your endpoints haven’t been launched via the process outlined in 3.5 yet…