Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the swarm sample, to include actual product data. #7

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aayush3011
Copy link

No description provided.

with open(filename, "r") as f:
data = json.load(f)

if len(data) > 300:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this logic means that some records are skipped if number of json docs in the file is greater than 300? What is this for?

purchase_history_container = database.get_container_client(PURCHASE_HISTORY_CONTAINER)

# Insert data into CosmosDB with embedding and indexing
file_prefix = "/Users/aayushkataria/git/multi-agent-swarm/src/data/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded

query="SELECT * FROM c",
enable_cross_partition_query=True

def process_and_insert_data(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could do with being parallelized and increasing default RU to 10000 for the container, or it takes quite a long time.

],
"vectorIndexes": [

full_text_policy = {
Copy link
Contributor

@TheovanKraay TheovanKraay Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have added full_text_policy but I can't see full text search being used anywhere? If not being used, I would say better to remove it.

Copy link
Contributor

@TheovanKraay TheovanKraay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @aayush3011 this is great! I added some comments. At minimum, the hardcoded data file location needs to get the path properly. The others are questions/suggestions. Great work, thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants