Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabriciocarraro/google_gemini-document_search_with_embeddings
https://github.com/fabriciocarraro/google_gemini-document_search_with_embeddings
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fabriciocarraro/google_gemini-document_search_with_embeddings
- Owner: fabriciocarraro
- Created: 2024-05-05T13:46:26.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-05T13:50:58.000Z (8 months ago)
- Last Synced: 2024-05-05T14:39:49.105Z (8 months ago)
- Language: Jupyter Notebook
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Gemini - Document Search with Embeddings
This GitHub repository contains a Google Colab notebook that showcases the integration and use of Google's generative AI library, google-generativeai, within a Colab environment. The notebook demonstrates various operations such as model listing, embedding generation, and retrieval-based document search using the Google AI models.
## Features
1. Model Exploration:
- The notebook includes code to list all available models from the library that support the embedding content generation method, providing insights into the specific models you can work with.
2. Embedding Content:
- Demonstrates how to generate embeddings for a given piece of text using a specific model. This is crucial for tasks like document retrieval, where the semantic understanding of content is necessary.
3. Document Retrieval:
- Implements a document retrieval system where documents are represented by their embeddings. A search query is embedded, and the notebook retrieves the document most similar to the query from a predefined list, using the cosine similarity between embeddings.
4. Interactive Search Example:
- The notebook allows for interactive testing with an example query about traveling to Europe, showcasing how the document retrieval system can be utilized in practical scenarios.
5. Content Generation:
- In addition to retrieval, the notebook also demonstrates content generation using a generative model to rewrite text in a casual style, showing the flexibility of Google's generative AI models in handling various text transformation tasks.