OracleSummary from the Oracle AI Vector Search LangChain integration.
Why summarization here? Summaries are a practical way to compress long documents into retrieval-friendly content (previews, metadata, or condensed context) while keeping governance and operational guarantees close to the data.If you are just starting with Oracle Database, consider exploring the free Oracle 26 AI. For an end-to-end setup walkthrough, see the Oracle AI Vector Search demo notebook. For background on user administration, refer to the official Oracle guide.
Prerequisites
Installlangchain-oracledb. The python-oracledb driver will be installed automatically as a dependency.
Connect to Oracle Database
The following sample code will show how to connect to Oracle Database. By default, python-oracledb runs in a ‘Thin’ mode which connects directly to Oracle Database. This mode does not need Oracle Client libraries. However, some additional functionality is available when python-oracledb uses them. Python-oracledb is said to be in ‘Thick’ mode when Oracle Client libraries are used. Both modes have comprehensive functionality supporting the Python Database API v2.0 Specification. See the following guide that talks about features supported in each mode. You might want to switch to thick-mode if you are unable to use thin-mode.Generate summary
The Oracle AI Vector Search LangChain library offers a suite of APIs designed for document summarization. It supports multiple summarization providers such as Database, OCIGENAI, HuggingFace, among others, allowing users to select the provider that best meets their needs. To utilize these capabilities, users must configure the summary parameters as specified. For detailed information on these parameters, please consult the Oracle AI Vector Search Guide book. Note: The users may need to set proxy if they want to use some 3rd party summary generation providers other than Oracle’s in-house and default provider: ‘database’. If you don’t have proxy, please remove the proxy parameter when you instantiate the OracleSummary.End to end demo
Please refer to our complete demo guide Oracle AI Vector Search End-to-End Demo Guide to build an end to end RAG pipeline with the help of Oracle AI Vector Search.Connect these docs to Claude, VSCode, and more via MCP for real-time answers.