id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
langchain/langchain101part3bta_233_0.txt | New York, NY, 10003 | |
langchain/retrievalinlangchain_33_0.txt | hf = HuggingFaceBgeEmbeddings(
model_name=model_name,
model_kwargs=model_kwargs,
encode_kwargs=encode_kwargs
) | |
langchain/LangChain_7_0.txt | Skip to main content
[   ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API ](https://api.python.langchain.com)
... | |
langchain/LangChain_24_3.txt | Neo4j Cypher Generation ](/docs/templates/neo4j-cypher) : Generate cypher statements from natural language. Available with a [ "full text" option ](/docs/templates/neo4j-cypher-ft) as well.
* [ Supabase Self Query ](/docs/templates/self-query-supabase) : Parse a natural language query into a semantic query as well a... | |
langchain/LangChain_17_7.txt | orization or logic that is user dependent, specify `
per_req_config_modifier ` when using ` add_routes ` . Use a callable receives
the raw ` Request ` object and can extract relevant information from it for
authentication and authorization purposes.
#### Using APIHandler
If you feel comfortable with FastAPI and p... | |
langchain/langchaindecodedpart_41_0.txt | *** Response ***
openai.error.InvalidRequestError: This model's maximum context length is 8191 tokens, however you requested 10001 tokens (10001 in your prompt; 0 for the completion). Please reduce your prompt; or completion length. | |
langchain/langchaindecodedpart_69_0.txt | [ Powered by Ghost ](https://ghost.org/) | |
langchain/langchaindecodedpart_16_0.txt | # Configure the API key
import os | |
langchain/textembedding_41_0.txt |
#### API Reference: | |
langchain/langchain101part3bta_123_0.txt | A lot of tutorials on vectorstores show examples of great vector matches. If I
ask, “ **What is the fine for speeding above 20 km/h?** ” and there is a chunk
containing “ **… fine for speeding speeding above 20 km/h is …** ”, then yes,
the response will be great. But if I rephrase, “ **Is there a road, where I’ll
not g... | |
langchain/LangChain_17_5.txt |
("system", "You are a helpful, professional assistant named Cob."),
MessagesPlaceholder(variable_name="messages"),
]
)
chain = prompt | ChatAnthropic(model="claude-2")
class InputChat(BaseModel):
"""Input for the chat endpoint."""
... | |
langchain/LangChain_12_0.txt | Skip to main content
[   ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API ](https://api.python.langchain.com)
... | |
langchain/LangChain_14_0.txt | Skip to main content
[   ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API ](https://api.python.langchain.com)
... | |
langchain/LangChain_8_3.txt | e the same as needed for the LLM).
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings()
Make sure you have Ollama running (same set up as with the LLM).
from langchain_community.embeddings import OllamaEmbeddings
embeddings = Ollam... | |
langchain/textembedding_25_0.txt | # Text embedding models | |
langchain/langchain101part3bta_109_0.txt | It’s time to look at indexes. | |
langchain/LangChain_0_0.txt | Skip to main content
[   ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API ](https://api.python.langchain.com)
... | |
langchain/langchaindecodedpart_6_0.txt | In this [ multi-part series ](https://alphasec.io/langchain-decoded-the-
muggles-guide-to-langchain) , I explore various LangChain modules and use
cases, and document my journey via [ Python notebooks on GitHub
](https://github.com/alphasecio/langchain-decoded?ref=alphasec.io) . The
previous post covered LangChain [ Mo... | |
langchain/langchaindecodedpart_61_0.txt | [ Next issue | |
langchain/LangChain_23_9.txt | her Nolan is photographed in Los Angeles ... Oppenheimer is a 2023 epic biographical thriller film written and directed by Christopher Nolan.It is based on the 2005 biography American Prometheus by Kai Bird and Martin J. Sherwin about J. Robert Oppenheimer, a theoretical physicist who was pivotal in developing the firs... | |
langchain/LangChain_1_1.txt | etadata to allow us to determine the ultimate source of this document
## Deletion modes
When indexing documents into a vector store, it’s possible that some existing
documents in the vector store should be deleted. In certain situations you may
want to remove any existing documents that are derived from the same... | |
langchain/langchain101part3bta_25_0.txt | 
Google Trends for terms Vectorstore and Embeddings | |
langchain/LangChain_34_1.txt | return (or retrieve) them. Vector stores can
be used as the backbone of a retriever, but there are other types of
retrievers as well.
Retrievers accept a string query as input and return a list of ` Document ` 's
as output.
## Advanced Retrieval Types
LangChain provides several advanced retrieval types. A full l... | |
langchain/LangChain_23_13.txt | ees the release of Christopher Nolan's new film, Oppenheimer, his first movie since 2020's Tenet and his split from Warner Bros. Billed as an epic thriller about "the man who ...
Thought:
> Finished chain.
Christopher Nolan was born on July 30, 1970. Now I need to calculate his ... | |
langchain/textembedding_9_0.txt | * [ Prompts ](/docs/modules/model_io/prompts/) | |
langchain/langchaindecodedpart_13_0.txt | [ 
](https://colab.research.google.com/github/alphasecio/langchain-
decoded/blob/main/notebooks/langchain_decoded_2_embeddings.ipynb?ref=alphasec.io) | |
langchain/langchain101part3bta_217_0.txt | May 01, 2024 | |
langchain/LangChain_6_11.txt | ### ` .set_entry_point `
def set_entry_point(self, key: str) -> None:
The entrypoint to the graph. This is the node that is first called. It only
takes one argument:
* ` key ` : The name of the node that should be called first.
#### ` .set_conditional_entry_point `
... | |
langchain/langchain101part3bta_24_0.txt | The terms vectorstores and embeddings are gaining more and more popularity. As
soon as the idea of integration of LLMs with our own data became a
possibility, we started to look into tools to make that a reality. | |
langchain/langchain101part3bta_189_0.txt | ##### [ Best Laptops for Deep Learning, Machine Learning (ML), and Data
Science for 2023 ](https://towardsai.net/p/news/best-laptops-for-machine-
learning-deep-learning-data-science-ml-f55602197593 "Best Laptops for Deep
Learning, Machine Learning \(ML\), and Data Science for 2023") | |
langchain/langchain101part3bta_251_0.txt | Always Enabled | |
langchain/LangChain_19_3.txt | latest/chains/langchain.chains.llm.LLMChain.html#langchain.chains.llm.LLMChain) | | |
[ ElasticsearchDatabaseChain ](https://api.python.langchain.com/en/latest/chains/langchain.chains.elasticsearch_database.base.ElasticsearchDatabaseChain.html#langchain.chains.elasticsearch_database.base.ElasticsearchDatabaseChain... | |
langchain/langchain101part3bta_11_0.txt | Master LLMs with our FREE course in collaboration with Activeloop & Intel
Disruptor Initiative. [ Join now! ](https://learn.activeloop.ai/courses/llms
"Training and Fine-tuning LLMs for Production") | |
langchain/langchain101part3bta_224_0.txt | [ AI ](https://towardsai.net/p/tag/ai) [ Algorithms
](https://towardsai.net/p/tag/algorithms) [ Artificial Intelligence
](https://towardsai.net/p/tag/artificial-intelligence) [ Big Data
](https://towardsai.net/p/tag/big-data) [ Business
](https://towardsai.net/p/tag/business) [ Chatbots
](https://towardsai.net/p/tag/ch... | |
langchain/retrievalinlangchain_72_0.txt | [

](/@sushmithabhanu24?source=post_page-----
f8be7fb0508a--------------------------------) | |
langchain/langchain101part3bta_10_0.txt | ## Resources | |
langchain/retrievalinlangchain_43_0.txt | #Document Loading
loader = WikipediaLoader(query=title, load_max_docs=5)
documents = loader.load() | |
langchain/langchain101part3bta_95_0.txt | * Limited Budget: Open-source options remain the go-to, including Chroma, Faiss, OpenSearch, and ClickHouse
* Moderate Budget: Managed services like Pinecone, Supabase, and potentially AWS OpenSearch or Azure Cognitive Search with pay-as-you-go models could be appropriate, especially for cloud solutions | |
langchain/langchain101part3bta_255_0.txt | Functional cookies help to perform certain functionalities like sharing the
content of the website on social media platforms, collect feedbacks, and other
third-party features. | |
langchain/textembedding_0_0.txt | Skip to main content | |
langchain/LangChain_8_6.txt | e")
docs = loader.load()
text_splitter = RecursiveCharacterTextSplitter()
documents = text_splitter.split_documents(docs)
embeddings = OpenAIEmbeddings()
vector = FAISS.from_documents(documents, embeddings)
retriever = vector.as_retriever()
# 2. Create Tools
retrie... | |
langchain/LangChain_22_1.txt | rage system will face when you ingest data into the
system. This means that the information most relevant to a query may be buried
in a document with a lot of irrelevant text. Passing that full document
through your application can lead to more expensive LLM calls and poorer
responses.
Contextual compression is meant ... | |
langchain/langchain101part3bta_207_0.txt | ##### [ NLP News Cypher | 10.18.20 ](https://towardsai.net/p/machine-
learning/nlp-news-cypher-10-18-20 "NLP News Cypher | 10.18.20") | |
langchain/langchain101part3bta_154_0.txt |  | |
langchain/langchain101part3bta_142_0.txt | This is the end of Part 3b. Talking to Documents: Embeddings and Vectorstores.
In Part 3c, we’ll make a mega-deep dive into RAGs. Stay tuned! | |
langchain/langchain101part3bta_107_0.txt | chroma_db = Chroma.from_documents(
documents=documents,
embedding=openai_embedding,
persist_directory=persist_directory
) | |
langchain/langchain101part3bta_275_0.txt | In order for Towards AI to work properly, we log user data. By using Towards
AI, you agree to our [ Privacy Policy ](https://towardsai.net/privacy) ,
including our cookie policy. | |
langchain/langchaindecodedpart_23_0.txt | embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key) | |
langchain/LangChain_41_12.txt | dsgravis) [ @ rihardsgravis
](https://github.com/rihardsgravis)
[

](https://github.com/kouroshHakha) [ @ kouroshHakha
](https://github.com/kouroshHakha)
[
 | |
langchain/langchain101part3bta_235_0.txt | [ [email protected] ](/cdn-cgi/l/email-
protection#2c49484558435e6c58435b4d5e485f4d4502424958) | |
langchain/langchain101part3bta_190_0.txt | [ 
](https://towardsai.net/p/news/best-workstations-for-deep-learning-data-
science-and-machine-learning-ml-4a6e43213b9e "Best Workstations for Deep
Learning... | |
langchain/retrievalinlangchain_25_0.txt | It is very simple to get the embeddings for multiple texts and single queries
using any embedding model. | |
langchain/langchain101part3bta_133_0.txt | However, setting the filters manually isn’t very flexible. We can use the
power of llms for our benefit here as well: | |
langchain/LangChain_8_7.txt | ebugging, testing, monitoring and more
* Learn more about serving your applications with [ LangServe ](/docs/langserve)
* * *
#### Help us out by providing feedback on this documentation page:
[ Previous Installation ](/docs/get_started/installation) [ Next Security
](/docs/security)
* Setup
* Jupyter... | |
langchain/LangChain_32_1.txt | embedding
methods for documents (to be searched over) vs queries (the search query
itself).
## Get started
### Setup
* OpenAI
* Cohere
To start we'll need to install the OpenAI partner package:
pip install langchain-openai
Accessing the API requires an API key, which you can get... | |
langchain/langchain101part3bta_162_0.txt | [ Mitigating Redundant UDF Computations in Spark Plans
](https://towardsai.net/p/machine-learning/mitigating-redundant-udf-
computations-in-spark-plans) | |
langchain/langchain101part3bta_216_0.txt | ##### [ Top Important Computer Vision Papers for the Week from 22/04 to 28/04
](https://towardsai.net/p/machine-learning/top-important-computer-vision-
papers-for-the-week-from-22-04-to-28-04 "Top Important Computer Vision Papers
for the Week from 22/04 to 28/04") | |
langchain/langchaindecodedpart_8_0.txt | 1. [ Models ](https://alphasec.io/langchain-decoded-part-1-models/)
2. Embeddings (this post)
3. [ Prompts ](https://alphasec.io/langchain-decoded-part-3-prompts/)
4. [ Indexes ](https://alphasec.io/langchain-decoded-part-4-indexes/)
5. [ Memory ](https://alphasec.io/langchain-decoded-part-5-memory/)
6. Chains
7. Agent... | |
langchain/retrievalinlangchain_61_0.txt | retriever = db.as_retriever(search_type='mmr', search_kwargs={"k": 1})
matched_docs = retriever.get_relevant_documents(query=query) | |
langchain/LangChain_17_2.txt | l-retrieval-chain) exposed via LangServe | [ server ](https://github.com/langchain-ai/langserve/tree/main/examples/conversational_retrieval_chain/server.py) , [ client ](https://github.com/langchain-ai/langserve/tree/main/examples/conversational_retrieval_chain/client.ipynb)
**Agent** without **conversation history... | |
langchain/langchain101part3bta_79_0.txt | We’ve heavily discussed how embedding works, what model to choose, and how
vectors are compared. Now, if you have a large knowledge base containing
thousands or millions of vectors, you’d need to perform such operations quite
efficiently. This is where vectorstores come into play. | |
langchain/langchain101part3bta_14_0.txt |  | |
langchain/LangChain_11_1.txt | ngServe is automatically installed by LangChain CLI. If not using
LangChain CLI, install with:
pip install "langserve[all]"
for both client and server dependencies. Or ` pip install "langserve[client]"
` for client code, and ` pip install "langserve[server]" ` for server code.
## LangChain CLI ... | |
langchain/langchain101part3bta_168_0.txt | [ __ 1 like ](https://towardsai.net/wp-admin/admin-
ajax.php?action=process_simple_like&post_id=32850&nonce=a9dade1234&is_comment=0&disabled=true
"Unlike") | |
langchain/langchain101part3bta_23_0.txt | Originally published on [ Towards AI ](https://towardsai.net/) . | |
langchain/langchain101part3bta_45_0.txt | During the inference phase, using the same embedding model, we’ll embed our
question. The achieved vector is compared with the vectors in our storage
using _cosine_similarity_ or other metric. Chunks with the most related
vectors are passed further the RAG pipeline. | |
langchain/langchain101part3bta_148_0.txt | or check out the full course: | |
langchain/LangChain_28_2.txt | lraj M M ](https://www.youtube.com/@insightbuilder)
* [ Build More Powerful LLM Applications for Business’s with LangChain (Beginners Guide) ](https://youtu.be/sp3-WLKEcBg) by [ No Code Blackbox ](https://www.youtube.com/@nocodeblackbox)
* [ LangFlow LLM Agent Demo for 🦜🔗LangChain ](https://youtu.be/zJxDHaWt-6o) ... | |
langchain/langchaindecodedpart_15_0.txt | # Install the OpenAI package
!pip install openai | |
langchain/retrievalinlangchain_32_0.txt | model_name = "BAAI/bge-base-en-v1.5"
model_kwargs = {"device": "cpu"}
encode_kwargs = {"normalize_embeddings": True} | |
langchain/LangChain_23_1.txt | th
callback support (chains, models, agents, tools, retrievers) to print the
inputs they receive and outputs they generate. This is the most verbose
setting and will fully log raw inputs and outputs.
from langchain.globals import set_debug
set_debug(True)
agent.run("Who directed... | |
snowflake_random_controlled_distribution/sqlserver_13_0.txt | [ 
](https://oralytics.files.wordpress.com/2023/01/image-1.png) | |
snowflake_random_controlled_distribution/953_233_0.txt | All reactions | |
snowflake_random_controlled_distribution/953_386_0.txt | --- | |
snowflake_random_controlled_distribution/953_325_0.txt | Copy link | |
snowflake_random_controlled_distribution/953_393_0.txt | [ @xrmx ](https://github.com/xrmx) I'm going to be connecting multiple Oracle
DBs, but here's the tablespace for one that I'm testing. | |
snowflake_random_controlled_distribution/sqlserver_167_0.txt | rq.get('Oracle').get('top') | |
snowflake_random_controlled_distribution/953_71_0.txt | [ 
](/Kikiero) | |
snowflake_random_controlled_distribution/953_356_0.txt | sql = sql.strip().strip(';')
eng = self.get_sqla_engine(schema=schema)
df = pd.read_sql(sql, eng) | |
snowflake_random_controlled_distribution/953_68_0.txt |
--- | |
snowflake_random_controlled_distribution/953_239_0.txt | edited | |
snowflake_random_controlled_distribution/953_241_0.txt | The error doesn't come up when I choose 'Table View' but when I change the
visualization type to any other view, it doesn't recognize the key | |
snowflake_random_controlled_distribution/sqlserver_41_0.txt |
The examples give above are some of the ways to obtain this information. As
with most things, there can be multiple ways of doing it, and most people will
have their preferred one which is based on their background and preferences. | |
snowflake_random_controlled_distribution/953_130_0.txt | Contributor | |
snowflake_random_controlled_distribution/Table_112_0.txt | Language : | |
snowflake_random_controlled_distribution/sqlserver_30_0.txt | SELECT table_name, table_rows
FROM INFORMATION_SCHEMA.TABLES
WHERE table_type = 'BASE TABLE'
AND TABLE_SCHEMA = current_user(); | |
snowflake_random_controlled_distribution/953_472_0.txt | [ zhaoyongjie ](/zhaoyongjie) pushed a commit to zhaoyongjie/incubator-
superset that referenced this issue Nov 26, 2021 | |
snowflake_random_controlled_distribution/953_176_0.txt | [ 
](/auroralinan) | |
snowflake_random_controlled_distribution/953_94_0.txt | print('--------- 3 ----------')
print(df.pivot_table( values='c', index=['a'],columns=['B'],
aggfunc=np.sum,margins=True)) | |
snowflake_random_controlled_distribution/953_376_0.txt | Sorry, something went wrong. | |
snowflake_random_controlled_distribution/953_338_0.txt | Sorry, something went wrong. | |
snowflake_random_controlled_distribution/953_279_0.txt | --- | |
snowflake_random_controlled_distribution/953_21_0.txt | * [ Pricing ](https://github.com/pricing) | |
snowflake_random_controlled_distribution/953_346_0.txt | All reactions | |
snowflake_random_controlled_distribution/953_429_0.txt | * feat(legacy-plugin-chart-heatmap): subject Add sort by metric | |
snowflake_random_controlled_distribution/sqlserver_112_0.txt | [

](https://oralytics.files.wordpress.com/2021/12/screenshot-2021-12-24-at-09.50.57.png) | |
snowflake_random_controlled_distribution/953_194_0.txt | **SELECT date_format( created_at,'%%d-%%m-%%Y')as DT,count(*) as CT
FROM user
group by DT. ** | |
snowflake_random_controlled_distribution/953_238_0.txt | **[ nikitathampi ](/nikitathampi) ** commented Aug 28, 2017 • | |
snowflake_random_controlled_distribution/oracle_42_0.txt | select random();
random |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.