Feedback on 0.2 docs #21716
Replies: 29 comments 29 replies
-
Wonderful, I guess it would be better to have a more distinctive title for the tutorials menu in the more section like "3rd party tutorials" to distinguish it between (official) "tutorials" menu in the sidebar menu |
Beta Was this translation helpful? Give feedback.
-
I'd like to help with langchain documentation. What is the best way to determine where to focus my effort? Would it be to review the issues or just dig in and contribute where I feel there is the most need? I've not contributed to open source projects before so please forgive my ignorance. |
Beta Was this translation helpful? Give feedback.
-
When I exercise the demo with "Build a Chatbot->managing-conversation-history".
the source code is: def filter_messages(messages, k=10):
#here maked the messages start with AIMessage
return messages[-k:]
prompt = ChatPromptTemplate.from_messages(
[
(
"system",
"You are a helpful assistant. Answer all questions to the best of your ability in {language}.",
),
MessagesPlaceholder(variable_name="messages"),
]
)
chain = (
RunnablePassthrough.assign(messages=lambda x: filter_messages(x["messages"]))
| prompt
| chat
)
messages = [
HumanMessage(content="hi! I'm bob"),
AIMessage(content="hi!"),
HumanMessage(content="I like vanilla ice cream"),
AIMessage(content="nice"),
HumanMessage(content="whats 2 + 2"),
AIMessage(content="4"),
HumanMessage(content="thanks"),
AIMessage(content="no problem!"),
HumanMessage(content="having fun?"),
AIMessage(content="yes!"),
]
response = chain.invoke(
{
"messages": messages + [HumanMessage(content="what's my name?")],
"language": "English",
}
) |
Beta Was this translation helpful? Give feedback.
-
Hi, I was trying to reproduce the code in the documentation related to agents. However, in the section (https://python.langchain.com/v0.2/docs/tutorials/agents/#tools), when selecting the Firework-AI example, the Mixtral-8x7b-instruct model is used, but it does not seem to be able to call the tools. |
Beta Was this translation helpful? Give feedback.
-
Hi LangChain Team, I’ve had the pleasure of reviewing the 0.2 docs and I must say, I’m genuinely impressed! The implementation of versioning support is a significant advancement that greatly enhances the user experience. Additionally, the flattened structure has simplified navigation, making the documentation more user-friendly. Overall, fantastic work on the docs! Best, |
Beta Was this translation helpful? Give feedback.
-
@baskaryan I couldnt find any descriptive details about "ConversationSummaryBufferMemory" in the preview of the 0.2 docs. In 0.1 langchain memory classes are still in Beta. I have some issues with ConversationSummaryBufferMemory as I mentioned here. I just want to know if there is any fixes in 0.2. |
Beta Was this translation helpful? Give feedback.
-
i prefer the older structure, maybe due to my mental map of where things are. Are there plans of removing 0.1 docs soon? |
Beta Was this translation helpful? Give feedback.
-
🙏Diataxis! In the words of Steve Balmer: DEVELOPERS DEVELOPERS DEVELOPER DEVELOPERS DEVELOPERS |
Beta Was this translation helpful? Give feedback.
-
Just updated a few things related to search indexing and ranking. If you have feedback about nonsensical search results, or queries that you think should map to specific pages, I would love to hear them to fix! |
Beta Was this translation helpful? Give feedback.
-
It would be great to be able download the full documentation as 1 pdf file. Makes it easier for me to create context for a custom bot with RAG. |
Beta Was this translation helpful? Give feedback.
-
Thumbs up on working on code examples, they're great when available. Suggestion: Langchain integrates with many other technologies, I think it would be useful to comment on the relationship between "langchain language" and the "integrated technology language". Using Langchain_chroma as an example: |
Beta Was this translation helpful? Give feedback.
-
Older structure was way more intuitive for new devs. |
Beta Was this translation helpful? Give feedback.
-
The documentation for version 0.2 needs a more structured approach. Currently, it is not user-friendly for newcomers and can be a significant headache for those looking to master it. Basic examples are either missing or buried within the structure. For instance, when I tried switching from LLMChain to Runnable, I encountered a TypeError: Expected a Runnable, callable or dict. Instead got an unsupported type: <class 'str'>. To resolve this issue, I referred to the Runnable Interface page. Since I was using an LLM, the page directed me to the LLMs page, which contained examples irrelevant to my case. After browsing through various examples and searching for a similar implementation pattern, I finally found the solution in the LLM Token Usage Tracking page. This is just one example. The concepts of how to work with LLMs are not familiar to every software engineer. Some topics are assumed to be understood, but often, that is not the case. Therefore, every entity should have a basic usage example to improve the documentation's usability and accessibility. Additionally, with the splitting of the library into different modules, there should be a clear, logical explanation of what should be imported from where, considering the first version had everything in one place. |
Beta Was this translation helpful? Give feedback.
-
The documentation for v0.2 is confusing to me. I still prefer v0.1. First of all, I am sure that the document has expressed the core content of Langchain. Since I have read about 70% of the 0.1 document before, I can quickly adapt to this method, but I feel that it is not friendly to newcomers, and there is no opportunity to progress step by step (I like to start with a simple introduction and then learn advanced topics and in-depth content) Now I feel that the cost of finding some topics or related examples has become higher because the knowledge is now placed in 3 different areas:
I understand this structure, but it seems that no well-known framework's documentation is designed in this way (sorry for being so direct), it is too scattered. If I want to learn any component, I should first look at the Concept, and then the How-to. When I am familiar with the core components of Langchain, I can look at the examples in the Tutorial more effectively. However, the problem is that:
|
Beta Was this translation helpful? Give feedback.
-
Looks like trim_message is not supported in langchain-core 0.2.X. |
Beta Was this translation helpful? Give feedback.
-
Hello, I noticed that the extraction example in the v0.2 documentation might need some updates to align with the current Please refer to the issue I raised (#23396) for more information. |
Beta Was this translation helpful? Give feedback.
-
When I use the Google Chrome translator, some links become invisible. |
Beta Was this translation helpful? Give feedback.
-
@baskaryan we built an AI IDE assist indexed on the latest 2.0 docs and it has been super helpful to us in the last 3 weeks. For instance, I asked it today: "i've this problem that in my rag chat app, i want the semantic meaning of my previous text messages to also be considered while finding contents relevant to my current message. how can i accomplish that?" and it gave me a complete code fixing this which worked! Can we highlight this for the community to benefit from? It's completely free to use. |
Beta Was this translation helpful? Give feedback.
-
There is no mapping between old and new docs and this is really confusing Thanks a lot for your effort |
Beta Was this translation helpful? Give feedback.
-
Love an easy way to switch from python to js! |
Beta Was this translation helpful? Give feedback.
-
Y'all have a nice tutorial on getting LLMs to write queries for SQL. (this: https://python.langchain.com/v0.2/docs/tutorials/sql_qa/) The problem is that this code here: from langchain.chains import create_sql_query_chain chain = create_sql_query_chain(llm, db) Returns SQL with markdown in it: SQLQuery: SELECT COUNT("EmployeeId") AS "EmployeeCount" FROM "Employee"; I can remove it using a simple method that takes the markdown out. But later in the tutorial you have got this:
from langchain_community.tools.sql_database.tool import QuerySQLDataBaseTool
execute_query = QuerySQLDataBaseTool(db=db)
write_query = create_sql_query_chain(llm, db)
chain = write_query | execute_query
chain.invoke({"question": "How many employees are there"})
And that code breaks now with this error:
Error: (sqlite3.OperationalError) near "SQLQuery": syntax error
[SQL: SQLQuery: SELECT COUNT("EmployeeId") AS "TotalEmployees" FROM "Employee";]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Maybe it has to do with the way I had to create the SQLite DB? I had to do this (maybe it's wrong, I'm running in Colab and couldn't find a different way to load a SQLite DB):
from sqlalchemy import create_engine
from langchain_community.utilities import SQLDatabase
db_path = '/content/drive/MyDrive/ColabNotebooks/Chinook.db'
# Create a SQLAlchemy engine from the sqlite3 connection
engine = create_engine(f"sqlite:///{db_path}")
db = SQLDatabase(engine) # Pass the engine to SQLDatabase
print(db.dialect)
print(db.get_usable_table_names())
db.run("SELECT * FROM Artist LIMIT 10;")
Bottom line: Is your latest code still compatible with your tutorial (url above)? |
Beta Was this translation helpful? Give feedback.
-
It would be great if the left menu pane had the option to unfold / un-collapse. The new panes look cleaner, but the old docs were easier to quickly navigate. Maybe there's a happy medium? |
Beta Was this translation helpful? Give feedback.
-
hello Team @baskaryan and @eyurtsev am with Amazon Bedrock team and we would like to have Bedrock specific documentation and code specially in the tutorials -- as in add a tab "Bedrock" and have the specific code in there. We would like to help build the pages and full tutorials and the documentation. Could you please suggest the path forward to achieve that we are going to add to langchain-aws as well, however we would like the core documentation to be improved and we would be contributing to that |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm writing this as genuine constructive feedback: |
Beta Was this translation helpful? Give feedback.
-
Correction Suggestion for Conversational RAG Tutorial In the section titled "Tying it Together" within the Conversational RAG tutorial, there's a line that reads:
However, the tutorial currently omits the installation requirement for this import. To resolve this, please add the following installation command prior to this section:
Including this installation step will help users avoid any errors related to missing dependencies. |
Beta Was this translation helpful? Give feedback.
-
Correction and Improvement Suggestion for Conversational RAG Tutorial In the Conversational RAG tutorial under the section titled "Agent Constructor," the tutorial suggests adding a checkpointer using the following code snippet:
However, this code produces a ValidationError related to the CompiledStateGraph requiring an instance of BaseCheckpointSaver. To address this issue, I consulted the LangGraph v2 documentation and found a more appropriate approach in the Add memory to a ReAct agent section:
I implemented this alternative and it works as expected. I recommend updating the tutorial to reflect this change to prevent confusion and ensure smooth integration for users. |
Beta Was this translation helpful? Give feedback.
-
Hello LangChain Team, I commend the excellent work on LangChain, the LLM framework. Since Python and JavaScript are the only officially supported languages, I’m curious if there are any plans to support Golang soon. In my search, I found this impressive repository: https://github.com/tmc/langchaingo, a Golang implementation of LangChain. However, I noticed that the documentation for this repo is not synchronized with the official LangChain documentation. I am considering writing documentation replicating all the official Python documentation examples and aligning them with https://github.com/tmc/langchaingo. Please let me know if this contribution would be valuable to the team and if there are any guidelines or support you can offer to ensure it aligns with LangChain’s standards. Best regards, |
Beta Was this translation helpful? Give feedback.
-
What's the difference between docstore and bytestore? I can't find any detail information about them in the document. |
Beta Was this translation helpful? Give feedback.
-
Hi, history = PostgresChatMessageHistory( https://python.langchain.com/v0.2/docs/integrations/memory/postgres_chat_message_history/ |
Beta Was this translation helpful? Give feedback.
-
We're releasing LangChain 0.2 the week of 5/20/24 (see #21437), and a major part of this release is revamping our docs.
The high level changes to the docs are that we:
You can read a bit more about these changes in our 0.2 intro blog and see a preview of the 0.2 docs here.
We'd love your feedback on the 0.2 docs.
All of these changes have been informed by great feedback we've gotten on the existing docs, and we want to make sure that we're continuing to improve.
If you'd prefer to leave anonymous feedback, you can use this Google Form.
Beta Was this translation helpful? Give feedback.
All reactions