Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs #974

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/docs/confident-ai-tracing-langchain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ Confident AI supports **multiple LangChain trace types**. For example, when you
- Tool
- Generic

## Returning Sources

If your RAG application is returning retrieval documents using LangChain's `RunnableParallel`, you must use assign the output of your RAG chain to the `RunnableParallel` object using **only the `output` key**.

```python
from langchain_core.runnables import RunnableParallel
...

rag_chain_with_source = RunnableParallel(
{"context": retriever, "question": RunnablePassthrough()}
).assign(output=rag_chain_from_docs) # use the output key
```

## Example: Tracing your LangChain Application

### 1. Import and Configure Models
Expand Down
Loading