# LLM + Vector DB for Enterprise Documentation #### (GPT-4 + Pinecone) (referred to as the **OP stack**) What kind of documentation? Software (Technical & User), HR (talent onboarding), financial, legal, or operational (SOPs) From [[project-ideas]] Used in [[contactAnalysis MVP]] Companies that rely on information and retrieval can benefit from this technology (retrieval augmentation) to improve search results. Long-term memory also decreases hallucinations in LLMs, which can be common with niche questions. Also, LLMs can only be updated so often because they are so expensive to train (parametric knowledge), so supplemental data is fed through the prompt (source knowledge). In addition to accessing proprietary data, a vector database can grant LLMs access to long-term memory. ![[Pasted image 20230920081239.png]] The basic workflow looks like this: - Embed and index - Use the OpenAI Embedding API to generate [[Vector Embeddings]] of your documents (or any text data). - Upload those vector embeddings into [[Pinecone]], which can store and index millions/billions of these vector embeddings, and search through them at ultra-low latencies. - Search - Pass your query text or document through the OpenAI Embedding API again. - Take the resulting vector embedding and send it as a [query](https://docs.pinecone.io/docs/query-data) to Pinecone. - Get back semantically similar documents, even if they don't share any keywords with the query. NOTES - [[Vector Database]] - [[Common Uses of Vector Embeddings]] - [[Retrieval Augmented Generation (RAG)]] - [[Hypothetical Document Embeddings (HyDE)]] - [[Langchain]] - [[Embedding Projections]] - [[RAG Illustrations]]