Skip to content

Missing vector search index creation in seed database #1

Description

@pmosconi

Hi,
thanks for the sample project.
I believe that seed-database.ts should contain the vector search index creation (at the end):

    // define Atlas Vector Search index
    const index = {
      name: "vector_index",
      type: "vectorSearch",
      definition: {
        fields: [
          {
            type: "vector",
            numDimensions: 1536,
            path: "embedding",
            similarity: "cosine"
          },
        ]
      }
    };
    await collection.createSearchIndex(index);
    console.log("Database vector index created");

Activity

  1. victorkuldeep commented on Dec 31, 2024

    @victorkuldeep

    That can be added on screen in MONGO Console. Also refine prompt sometimes LLM appends preambles

    const prompt = `You are a helpful assistant that generates employee data. Generate 10 fictional employee records in CLEAN JSON FORMAT and no preamble. Each record should include the following fields: employee_id, first_name, last_name, date_of_birth, address, contact_details, job_details, work_location, reporting_manager, skills, performance_reviews, benefits, emergency_contact, notes. Ensure variety in the data and realistic values.

    ${parser.getFormatInstructions()}`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions