-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Pprados/rag vectorstore #13910
Open
pprados
wants to merge
70
commits into
langchain-ai:master
Choose a base branch
from
pprados:pprados/rag_vectorstore
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pprados/rag vectorstore #13910
+8,337
−3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Thank you for contributing to LangChain! Replace this entire comment with: - **Description:** a description of the change, - **Issue:** the issue # it fixes (if applicable), - **Dependencies:** any dependencies required for this change, - **Tag maintainer:** for a quicker response, tag the relevant maintainer (see below), - **Twitter handle:** we announce bigger features on Twitter. If your PR gets announced, and you'd like a mention, we'll gladly shout you out! Please make sure your PR is passing linting and testing before submitting. Run `make format`, `make lint` and `make test` to check this locally. See contribution guidelines for more information on how to write/run tests, lint, etc: https://github.com/langchain-ai/langchain/blob/master/.github/CONTRIBUTING.md If you're adding a new integration, please include: 1. a test for the integration, preferably unit tests that do not rely on network access, 2. an example notebook showing its use. It lives in `docs/extras` directory. If no one reviews your PR within a few days, please @-mention one of @baskaryan, @eyurtsev, @hwchase17. -->
To the in-memory outputs. Separate it out from the outputs so it's present in the dataframe.describe() results
Changes: - remove langchain_core/schema since no clear distinction b/n schema and non-schema modules - make every module that doesn't end in -y plural - where easy have 1-2 classes per file - no more than one level of nesting in directories - only import from top level core modules in langchain
- **Description:** We need to update the Dockerfile for templates to also copy your README.md. This is because poetry requires that a readme exists if it is specified in the pyproject.toml
Upgrade langserve template version to 0.0.30 to include new improvements
Adds a cookbook for semi-structured RAG via Docugami. This follows the same outline as the semi-structured RAG with Unstructured cookbook: https://github.com/langchain-ai/langchain/blob/master/cookbook/Semi_Structured_RAG.ipynb The main change is this cookbook uses Docugami instead of Unstructured to find text and tables, and shows how XML markup in the output helps with retrieval and generation. We are \@docugami on twitter, I am \@tjaffri --------- Co-authored-by: Taqi Jaffri <tjaffri@docugami.com>
Fix some circular deps: - move PromptValue into top level module bc both PromptTemplates and OutputParsers import - move tracer context vars to `tracers.context` and import them in functions in `callbacks.manager` - add core import tests
Provider check was incorrectly failing for anything other than "meta"
- Adds pydantic/import linting to core - Adds a check for `langchain_experimental` imports to langchain
…ate(...) (langchain-ai#13645) **Description:** BaseStringMessagePromptTemplate.from_template was passing the value of partial_variables into cls(...) via **kwargs, rather than passing it to PromptTemplate.from_template. Which resulted in those *partial_variables being* lost and becoming required *input_variables*. Co-authored-by: Josep Pon Farreny <josep.pon-farreny@siemens.com> Co-authored-by: Bagatur <baskaryan@gmail.com>
…-ai#13626) **Description:** Currently, if we pass in a ToolMessage back to the chain, it crashes with error `Got unsupported message type: ` This fixes it. Tested locally --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
- **Description:** add method embed_general_texts in VoyageEmebddings to support input_type - **Issue:** - **Dependencies:** - **Tag maintainer:** - **Twitter handle:** @Voyage_AI_
…3652) - **Description:** This commit fixed the problem that Redis vector store will change the value of a metadata from 0 to empty when saving the document, which should be an un-intended behavior. - **Issue:** N/A - **Dependencies:** N/A
Co-authored-by: Lance Martin <lance@langchain.dev>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
pprados
force-pushed
the
pprados/rag_vectorstore
branch
from
November 27, 2023 12:12
82acf08
to
56eff69
Compare
pprados
force-pushed
the
pprados/rag_vectorstore
branch
from
November 27, 2023 16:13
c172423
to
375b8b5
Compare
pprados
force-pushed
the
pprados/rag_vectorstore
branch
from
November 27, 2023 16:56
375b8b5
to
70880a9
Compare
dosubot
bot
added
size:XXL
This PR changes 1000+ lines, ignoring generated files.
Ɑ: vector store
Related to vector store module
🤖:enhancement
A large net-new component, integration, or chain. Use sparingly. The largest features
labels
Nov 27, 2023
This was referenced Nov 28, 2023
@hwchase17 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🤖:enhancement
A large net-new component, integration, or chain. Use sparingly. The largest features
size:XXL
This PR changes 1000+ lines, ignoring generated files.
Ɑ: vector store
Related to vector store module
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The
ParentDocumentRetriever
class provides theadd_documents()
methods, which may seem unconventional for a retriever.This deviation arises from the need to establish and maintain connections between document fragments and their various iterations. Consequently, the
parent_splitter
andchild_splitter
were introduced. As elaborated in this pull request, it's crucial not to confine oneself to text splitters exclusively. Instead, a preference is given to working with transformations, from which text splitters inherit.However, my initial proposal proved insufficient to fully leverage this concept with all the advanced features of Langchain. An issue has been raised to address this limitation.
To enhance text selection, the proposed idea by
ParentDocumentRetriever
is as follows:For this purpose, maintaining a link between the original document, each document chunk, and every transformation
applied to each chunk is essential.
My Proposition:
The
RagVectorStore
class serves as a vector store wrapper with rules for transforming a documentinto a chunk and each chunk into different versions. It closely resembles
ParentRetriever
but employsa
VectorStore
instead of aRetriever
.This approach is advantageous due to its simplicity and compatibility with all advanced features of Langchain.
Feel free to explore the benefits of this solution in this notebook.
Compatibility includes:
The implementation required several changes and additional pull requests, each of which can be validated independently before merging into this one:
Issues:
Dependencies:
Any dependencies required for this change.
Tag Maintainers:
@baskaryan @hwchase17
Twitter Handle:
Twitter account: pprados