langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
94.63k stars 15.31k forks source link

Query constructor is adding additional attributes that doesnt exist in doc source #25914

Open erdult opened 2 months ago

erdult commented 2 months ago

Checked other resources

Example Code

Is there a way to enforce that query constructor doesnt inject filters that doesnt exist

image

image

Error Message and Stack Trace (if applicable)

No response

Description

Is there a way to enforce that query constructor doesnt inject filters that doesnt exist

System Info

System Information

OS: Windows OS Version: 10.0.19045 Python Version: 3.11.7 | packaged by Anaconda, Inc. | (main, Dec 15 2023, 18:05:47) [MSC v.1916 64 bit (AMD64)]

Package Information

langchain_core: 0.2.34 langchain: 0.2.14 langchain_community: 0.2.12 langsmith: 0.1.104 langchain_chroma: 0.1.3 langchain_cli: 0.0.30 langchain_experimental: 0.0.64 langchain_openai: 0.1.22 langchain_text_splitters: 0.2.2 langchainhub: 0.1.21 langgraph: 0.2.14 langserve: 0.2.2

Other Dependencies

aiohttp: 3.10.5 async-timeout: Installed. No version info available. chromadb: 0.5.3 dataclasses-json: 0.6.7 fastapi: 0.112.2 gitpython: 3.1.43 httpx: 0.27.0 jsonpatch: 1.33 langgraph-checkpoint: 1.0.6 langserve[all]: Installed. No version info available. libcst: 1.4.0 numpy: 1.26.4 openai: 1.42.0 orjson: 3.10.7 packaging: 24.1 pydantic: 2.8.2 pyproject-toml: 0.0.10 PyYAML: 6.0.2 requests: 2.32.3 SQLAlchemy: 2.0.32 sse-starlette: 1.8.2 tenacity: 8.5.0 tiktoken: 0.7.0 tomlkit: 0.12.5 typer[all]: Installed. No version info available. types-requests: 2.32.0.20240712 typing-extensions: 4.12.2 uvicorn: 0.23.2

erdult commented 2 months ago

is there any ideas how to resolve this issue, for example a custom filter cleaner after the query is created?

AntonioFerreras commented 2 weeks ago

Hey erdult, could you provide some minimal code that reproduces your issue?