Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
145 changes: 145 additions & 0 deletions apple-and-weaviate-2/2025-02-01-prompt-descriptions/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
title: Weaviate Cloud Queries - A Practical Guide
slug: apple-apps-part-11
authors: [randy, adam]
date: 2025-02-01
tags: [iOS, mobile app development, vector databases]
image: ./img/hero.png

---

**Weaviate Cloud (WCD) Queries: A Practical Guide**

**Query Prompt Descriptions**

The following queries prompt types are discussed.

All queries require a Weaviate API key that is already provided.

Depending on the type of query run, an OpenAI and/or Cohere API key may be required (see below).

**Primary:** Fundamental options for querying data.

- **Basic:** A simple query that retrieves a limited amount of items
- **Third Item:** Skip to the third item of a query
- **Meta Data:** Properties (eg. ID, creation date, last update date, etc) available that go beyond the original values loaded on to the vector database

**Reorder:** Rearranging or prioritizing the data.

- **Move Away:** Allow users to prioritize similar terms/concepts and deemphasize others. (+Open AI Key)
- **ReRank:** Change the order in which data elements are displayed, perhaps based on specific criteria. (+Open AI Key, Cohere Key)

**Aggregate:** Summarizing count data.

- **By Category:** Group counts based on specific attributes.
- **Grand Total:** Total count of the entire dataset.

**Single Result:** RAG processing resulting in a single result.

- **Summary:** Summary of a specific query. (+Open AI Key, Cohere Key)
- **Translate To:** Translate data elements or results into different languages. (+Open AI Key, Cohere Key)
- **Translate From/To:** Translate data elements or results from different languages to different languages. (+Open AI Key, Cohere Key)

**Grouped Result:** Grouping or organizing data using RAG

- **Grouped Result:** Perform prompt on all records retrieved from another prompt. (+Open AI Key, Cohere Key)

Primary

**Basic**

The basic building block for creating a query.

Example: Get the first 5 Books and list the title, number of pages and description.

![Basic Prompt](./img/wcs_summary_prompt_01_basic.png)


**Third Item**

Query starting from the third record.

Example: Using the Basic Query as a starter, skip the first two books and start from the book that follows. Example: Starting from the 3rd book: list the title, number of pages and description of the next 5.

![Third Item](./img/wcs_summary_prompt_02_thirdItem.png)


**Meta Data**

Show information that extends beyond the initial domain data loaded. This is data generated by the system.

Example: Include ID, creation date, last update date.

![Meta Data](./img/wcs_summary_prompt_03_metaData.png)

Reorder

**Move Away**

Allow users to prioritize similar concepts and deemphasize others. Example: Emphasize “war” themes and deemphasize “romance”.

![Move Away](./img/wcs_summary_prompt_04_moveAway.png)


**Rerank**

Change the order in which data elements are displayed based on specific criteria. This is data generated by the system.

Example: The result is reranked to prioritize descriptions that discuss robots.

![Rerank](./img/wcs_summary_prompt_05_rerank.png)


Aggregate

**By Category**

Group counts based on specific attributes.

Example: Show the number of books for each category.

![By Category](./img/wcs_summary_prompt_06_byCategory.png)


**Grand Total**

Total count of the entire dataset.

Example: Show the count of all books in the database.

![Grand Total](./img/wcs_summary_prompt_07_grandTotal.png)

Single Result!

**Summary**

Summary of a specific query.

Example: Summarize in 10 words books with a mystery theme that occur in Western Europe.

![Grand Total](./img/wcs_summary_prompt_08_summary.png)


**Translate To**

Translate data elements or results into different languages.

Example: Search for Mexican books and translate the title into Spanish.

![Translate to](./img/wcs_summary_prompt_09_translateTo.png)

**Translate From/To**

Translate data elements or results from different languages to different languages. Example: Ask a question in Spanish and translate the title into Spanish.

![Translate from and to](./img/wcs_summary_prompt_10_translateFromTo.png)

Grouped Result!

**Grouped Result**

Perform prompt on all records retrieved from another prompt. Example: Search for books about the governments in Europe.

Summarize what the leaders of the result have in common.

![Grouped Result](./img/wcs_summary_prompt_11_groupedResult.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions apple-and-weaviate-2/2025-02-01-query-helper-application/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: Weaviate Cloud Queries - A Practical Guide
slug: apple-apps-part-12
authors: [randy, adam]
date: 2025-02-01
tags: [iOS, mobile app development, vector databases]
image: ./img/hero.png

---

**Weaviate Cloud (WCD) Queries: A Practical Guide**

**Query Helper Application**

A MacOS application you can use to perform a live test of Weaviate Queries.

![Mac Query App](img/wcs_summary_01_macApp.png)

Query Helper Application Screen

API Settings


The first order of business is to create the API keys needed to run the application as needed.

![Setting API Keys](./img/wcs_summary_02_apiSettings.png)

API Key Settings Panel

Of the 3 API Keys, the **Weaviate API key is already defined** for you and cannot be changed for this demo app.

An explanation of each key, how it is used, and a link to how to define your own appears below.

- **Weaviate API Key:** Access key to the Weaviate Vector DB that holds the domain data
- **OpenAI API Key:** Access key to OpenAI that Weaviate uses to access OpenAI Large Language Models to query embeddings. Create a key at: <https://openai.com/>
- **Cohere API Key:** Access key to Cohere that Weaviate uses for text embedding, generative AI and reranking. Create a key at: <https://cohere.com>/

Keys can be defined to the application by clicking on the settings icon to bring up the **API Key Settings Panel**.

![API Key](./img/wcs_summary_03_apiKey.png)

Activating the API Key Settings Panel

Query Prompt Buttons

![Query Prompt Button](./img/wcs_summary_04_queryPromptButton.png)

Query Prompt Features include:

- **Copy Prompt:** For use in your own apps. 
 ![Copy Icon](./img/wcs_summary_05_iconCopy.png)
- **Reset Prompt to the Original One Selected:** Reset, if prompt was changed ![Reset Icon](./img/wcs_summary_06_iconReset.png)manually. 

- **Search Prompt:** Begin Search using prompt.![Reset Icon](./img/wcs_summary_07_iconSearch.png)

Query Prompt

The Query Prompt can be changed manually in the query text box and run against a Weaviate Vector DB giving you the opportunity to experiment with your own ideas.

![Query Prompt](./img/wcs_summary_08_queryPrompt.png)

Query Menu

Preset query templates are accessed through the Query Menu by selecting the button of your choice.

![Query Menu](./img/wcs_summary_09_queryMenu.png)

Each template is explained in detail later in this article.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions blog/2025-02-01-iOS-apps-and-weaviate-2/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Weaviate Cloud (WCD) Queries - A Practical Guide

slug: apple-and-weaviate-2
authors: [randy, adam]
date: 2025-02-01
tags: ['how-to']
image: ./img/hero.png
description: "A practical guide on using Weaviate Cloud Queries."
---


![Weaviate Cloud (WCD) Queries: A Practical Guide](./img/hero.png)

# Overview

Understanding the capabilities of Weaviate Cloud (WCD) queries and implementing them practically in your applications is not always obvious. This article aims to help you bridge that gap by providing detailed explanations of common and easily implemented query types, along with a live tool to demonstrate the results.

Included is a downloadable application for Mac users to run live examples directly on their laptop.

Feel free to copy and paste these queries into your own projects for use as a template for your own queries.

1. [Query Helper Application](/apple-and-weaviate-2/apple-apps-part-11). A working MacOS app that runs queries.

1. [Prompt Descriptions](/apple-and-weaviate-2/apple-apps-part-12). Query prompt examples.


For IOS and Mac Developers looking to develop on Weaviate, check out this article.

[https://weaviate.io/blog/apple-and-weaviate](https://weaviate.io/blog/apple-and-weaviate)

To get familiar with the data used and how the Weaviate Database was created you can reference.

[https://github.com/weaviate/BookRecs](https://github.com/weaviate/BookRecs)


These articles are based on Adam Chan’s Book Recommendation project found at this Git repo [here](https://github.com/weaviate/BookRecs).



Without his collaboration and support these articles would not have been possible.



import WhatsNext from '/_includes/what-next.mdx';

<WhatsNext />
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6493,9 +6493,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599:
version "1.0.30001627"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001627.tgz#8071c42d468e06ed2fb2c545efe79a663fd326ab"
integrity sha512-4zgNiB8nTyV/tHhwZrFs88ryjls/lHiqFhrxCW4qSTeuRByBVnPYpDInchOIySWknznucaf31Z4KYqjfbrecVw==
version "1.0.30001696"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001696.tgz"
integrity sha512-pDCPkvzfa39ehJtJ+OwGT/2yvT2SbjfHhiIW2LWOAcMQ7BzwxT/XuyUp4OTOd0XFWA6BKw0JalnBHgSi5DGJBQ==

ccount@^1.0.0:
version "1.1.0"
Expand Down