def rag_chain(question):
        """Processes a question to retrieve and format relevant documents, and generates a response using a language model.

    Args:
        question (str): The question or query that needs to be answered.

    Returns:
        str: The response generated by the language model based on the retrieved and formatted documents."""
        retrieved_docs = retriever.invoke(question)
        formatted_context = combine_docs(retrieved_docs)
        return ollama_llm(question, formatted_context)
Processes a question to retrieve and format relevant documents, and generates a response using a language model.

    Args:
        question (str): The question or query that needs to be answered.

    Returns:
        str: The response generated by the language model based on the retrieved and formatted documents.
rag_tutorials/llama3.1_local_rag/llama3.1_local_rag.py