Skip to content

Commit

Permalink
docs[minor]: Add new QA & RAG use case section (#4211)
Browse files Browse the repository at this point in the history
* added index & quickstart pages

* sources page

* chat history notebook

* streaming

* one more streaming cell

* cr

* almost finished

* agents notebook

* local models

* cr

* commit quickstart

* gitignore .md files

* docs

* cr

* cr

* lets goooooo

* chore: lint files

* fix links

* cr

* drop unnecessary dep

* cer

* cr

* cr
  • Loading branch information
bracesproul authored Feb 5, 2024
1 parent 2b4497f commit 7b04978
Show file tree
Hide file tree
Showing 29 changed files with 4,138 additions and 895 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ langchain/api_refs_docs_build/dist/**/*

.docusaurus/
docs/build/
docs/api_refs/typedoc.json
docs/api_refs/typedoc.json
docs/core_docs/**/*.md
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,32 @@ and in generated documentation.

### Contribute Documentation

#### Install dependencies

##### Note: you only need to follow these steps if you are building the docs site locally.

1. [Quarto](https://quarto.org/) - package that converts Jupyter notebooks (`.ipynb` files) into `.mdx` files for serving in Docusaurus.
2. `yarn build --filter=core_docs` - It's as simple as that! (or you can simply run `yarn build` from `docs/core_docs/`)

All notebooks are converted to `.md` files and automatically gitignored. If you would like to create a non notebook doc, it must be a `.mdx` file.

### Writing Notebooks

When adding new dependencies inside the notebook you must update the import map inside `deno.json` in the root of the LangChain repo.

This is required because the notebooks use the Deno runtime, and Deno formats imports differently than Node.js.

Example:

```typescript
// Import in Node:
import { z } from "zod";
// Import in Deno:
import { z } from "npm:/zod";
```

See examples inside `deno.json` for more details.

Docs are largely autogenerated by [TypeDoc](https://typedoc.org/) from the code.

For that reason, we ask that you add good documentation to all classes and methods.
Expand Down
14 changes: 14 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"imports": {
"langchain/": "npm:/langchain/",
"@langchain/community/": "npm:/@langchain/community/",
"@langchain/openai": "npm:@langchain/openai",
"@langchain/core/": "npm:/@langchain/core/",
"cheerio": "npm:/cheerio",
"@langchain/pinecone": "npm:@langchain/pinecone",
"@pinecone-database/pinecone": "npm:@pinecone-database/pinecone",
"zod": "npm:/zod",
"@langchain/anthropic": "npm:@langchain/anthropic",
"node-llama-cpp": "npm:/node-llama-cpp"
}
}
2 changes: 2 additions & 0 deletions docs/core_docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ yarn-error.log*
!.yarn/releases
!.yarn/sdks
!.yarn/versions

/.quarto/
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/core_docs/docs/get_started/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Let models choose which tools to use given high-level directives
Walkthroughs and techniques for common end-to-end use cases, like:

- [Document question answering](/docs/use_cases/question_answering/)
- [RAG](/docs/use_cases/rag/code_understanding)
- [RAG](/docs/use_cases/question_answering/)
- [Agents](/docs/use_cases/autonomous_agents/)
- and much more...

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RAG over code
# Code Understanding

## Use case

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
label: 'QA and Chat over Documents'
label: 'Q&A with RAG'
position: 3

This file was deleted.

Loading

0 comments on commit 7b04978

Please sign in to comment.