### Develop RAG Playground Examples Locally Source: https://github.com/poloclub/mememo/blob/main/README.md These commands provide instructions for setting up and running the RAG Playground examples: cloning the repository, navigating to the example directory, installing its dependencies, and starting the development server. ```Bash git clone git@github.com:poloclub/mememo.git cd ./examples/rag-playground npm install npm run dev ``` -------------------------------- ### Install RAG Playground Example Dependencies Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command installs all necessary Node.js dependencies specifically for the RAG Playground example application. ```bash npm install ``` -------------------------------- ### Run RAG Playground Development Server Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command starts the development server for the RAG Playground example, typically making it accessible via localhost:3000 in a web browser. ```bash npm run dev ``` -------------------------------- ### Develop MeMemo Library Locally Source: https://github.com/poloclub/mememo/blob/main/README.md These commands outline the steps to set up the MeMemo development environment: cloning the repository, installing dependencies, and running unit tests using Vitest. ```Bash git clone git@github.com:poloclub/mememo.git npm install npm run test ``` -------------------------------- ### Install MeMemo Development Dependencies Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command installs all required Node.js dependencies for developing the MeMemo library itself. ```bash npm install ``` -------------------------------- ### Navigate to RAG Playground Example Directory Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command changes the current working directory to the 'rag-playground' example folder within the MeMemo repository. ```bash cd ./examples/rag-playground ``` -------------------------------- ### Install MeMemo JavaScript Library Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command installs the MeMemo library using npm, making it available for use in both browser and Node.js environments. ```bash npm install mememo ``` -------------------------------- ### Install MeMemo Library Source: https://github.com/poloclub/mememo/blob/main/README.md This command installs the MeMemo JavaScript library using npm, making it available for both browser and Node.js environments. ```Bash npm install mememo ``` -------------------------------- ### Run MeMemo Unit Tests with Vitest Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command executes the unit tests for the MeMemo library using Vitest, ensuring the code's functionality and quality. ```bash npm run test ``` -------------------------------- ### Clone MeMemo GitHub Repository Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This command clones the entire MeMemo project repository from GitHub, providing access to the source code for development. ```bash git clone git@github.com:poloclub/mememo.git ``` -------------------------------- ### Perform Vector Search and Storage with HNSW Source: https://github.com/poloclub/mememo/blob/main/README.md This TypeScript code demonstrates how to import the HNSW class, create a new vector index, insert elements in batches, and query for k-nearest neighbors using a specified distance function (e.g., cosine). ```TypeScript // Import the HNSW class from the MeMemo module import { HNSW } from 'mememo'; // Creating a new index const index = new HNSW({ distanceFunction: 'cosine' }); // Inserting elements into our index in batches let keys: string[]; let values: number[][]; await index.bulkInsert(keys, values); // Find k-nearest neighbors let query: number[]; const { keys, distances } = await index.query(query, k); ``` -------------------------------- ### Perform Vector Search and Storage with MeMemo HNSW Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This TypeScript code demonstrates how to initialize an HNSW index with a specified distance function, insert elements in batches, and perform approximate nearest neighbor queries to find similar vectors. ```typescript // Import the HNSW class from the MeMemo module import { HNSW } from 'mememo'; // Creating a new index const index = new HNSW({ distanceFunction: 'cosine' }); // Inserting elements into our index in batches let keys: string[]; let values: number[][]; await index.bulkInsert(keys, values); // Find k-nearest neighbors let query: number[]; const { keys, distances } = await index.query(query, k); ``` -------------------------------- ### Cite MeMemo Research Paper Source: https://github.com/poloclub/mememo/blob/main/README.md This BibTeX entry provides the citation information for the MeMemo research paper published at SIGIR'24, useful for academic references. ```BibTeX @inproceedings{wangMeMemoOndeviceRetrieval2024, title = {{{MeMemo}}: {{On-device Retrieval Augmentation}} for {{Private}} and {{Personalized Text Generation}}}, booktitle = {Proceedings of the 47th {{International ACM SIGIR Conference}} on {{Research}} and {{Development}} in {{Information Retrieval}}}, author = {Wang, Zijie J. and Chau, Duen Horng}, year = {2024}, urldate = {2024-06-26}, langid = {english} } ``` -------------------------------- ### MeMemo Research Paper BibTeX Citation Source: https://github.com/poloclub/mememo/blob/main/examples/rag-playground/README.md This BibTeX entry provides the academic citation details for the MeMemo research paper published at SIGIR'24, suitable for inclusion in academic documents. ```bibtex @inproceedings{wangMeMemoOndeviceRetrieval2024, title = {{{MeMemo}}: {{On-device Retrieval Augmentation}} for {{Private}} and {{Personalized Text Generation}}}, booktitle = {Proceedings of the 47th {{International ACM SIGIR Conference}} on {{Research}} and {{Development}} in {{Information Retrieval}}}, author = {Wang, Zijie J. and Chau, Duen Horng}, year = {2024}, urldate = {2024-06-26}, langid = {english} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.