Skip to content

Commit c828f74

Browse files
docs(product): add brief documentation for LangChain support (#7061)
* docs(product): add brief documentation for Langchain support * Update --------- Co-authored-by: Igor Lukanin <[email protected]>
1 parent c5f801b commit c828f74

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

docs/docs-new/pages/product/configuration/visualization-tools.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ to other BIs or visualization tools not listed here.
8888
/>
8989
</Grid>
9090

91-
## Custom data experiences
91+
## AI- & LLM-based experiences
9292

9393
The following tools deliver data insights closer to end users, e.g., by
9494
providing a conversational interface for semantic layer:
@@ -99,6 +99,11 @@ providing a conversational interface for semantic layer:
9999
imageUrl="https://static.cube.dev/icons/delphi.svg"
100100
title="Delphi"
101101
/>
102+
<GridItem
103+
url="visualization-tools/langchain"
104+
imageUrl="https://static.cube.dev/icons/langchain.svg"
105+
title="LangChain"
106+
/>
102107
</Grid>
103108

104109
## Low-code tools & internal tool builders
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# LangChain
2+
3+
[LangChain][langchain] is a framework designed to simplify the creation of
4+
applications using large language models.
5+
6+
To get started with LangChain, follow the [instructions][langchain-docs-getting-started].
7+
8+
## Document loader
9+
10+
Cube's integration with LangChain comes as the [document loader][langchain-docs-cube]
11+
that is intended to be used to populate a vector database with embeddings derived
12+
from the data model. Later, this vector database can be queried to find best-matching
13+
entities of the semantic layer. This is useful to match free-form input, e.g., queries
14+
in a natural language, with the views and their members in the data model.
15+
16+
<Diagram src="https://ucarecdn.com/32e98c8b-a920-4620-a8d2-05d57618db8e/" />
17+
18+
We're also providing an chat-based demo application (see source code on GitHub) with example OpenAI prompts for constructing queries to Cube's SQL API. If you wish to create an AI-powered conversational interface for the semantic layer, functioning similar to Delphi, these prompts can be a good starting point.
19+
20+
## Configuring the connection to Cube
21+
22+
The document loader connects to Cube using the [REST API][ref-rest-api], and will need a
23+
[JWT][ref-jwt] to authenticate.
24+
25+
If you're using Cube Cloud, you can retrieve these details from a deployment's
26+
<Btn>Overview</Btn> page.
27+
28+
## Querying Cube
29+
30+
Please refer to the [blog post](https://cube-blog-preview.vercel.app/blog/introducing-the-langchain-integration)
31+
for details on querying Cube and building a complete AI-based application.
32+
33+
Also, please feel free to review a chat-based demo application [source code](https://github.com/cube-js/cube/tree/master/examples/langchain)
34+
on GitHub.
35+
36+
[langchain]: https://python.langchain.com/
37+
[langchain-docs-getting-started]:
38+
https://python.langchain.com/docs/get_started/installation.html
39+
[langchain-docs-cube]:
40+
https://python.langchain.com/docs/integrations/document_loaders/cube_semantic#example
41+
[ref-rest-api]: /product/apis-integrations/rest-api
42+
[ref-jwt]: /product/auth#generating-json-web-tokens-jwt

docs/docs-new/pages/product/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ to your customers and driving intelligence back into the business.
1818

1919
With Cube, you can build a data model, manage access control and caching, and expose your data to every application
2020
via REST, GraphQL, and SQL APIs. With these APIs, you can use any charting library to build custom UI,
21-
connect existing dashboarding and reporting tools, and build AI agents with frameworks like Langchain.
21+
connect existing dashboarding and reporting tools, and build AI agents with frameworks like LangChain.
2222

2323

2424
## Code-first

0 commit comments

Comments
 (0)