--- title: Claude Custom Assistant emoji: ⚡ colorFrom: yellow colorTo: gray sdk: gradio sdk_version: 4.36.1 app_file: app.py pinned: false license: mit short_description: A Claude-based bot w/ custom knowledge and instructions thumbnail: >- https://cdn-uploads.huggingface.co/production/uploads/64964a906105da037e718533/ZSmWogsmPBHI-P9lwxV0Y.jpeg --- Claude 3.5 Sonnet has been well received by educators interested in AI integration. For many, it is the first model to outperform its OpenAI competitor, GPT-4o, and its "artifact" feature seems particularly successful. However, both the lack of internet access and the inability to create shareable custom assistants are often pointed out as clear disadvantages. In reality, Claude CAN access and leverage information from the internet - if provided with the appropriate functions and tools. Just like OpenAI, Anthropic has an "API" interface, usually meant for developers, which also makes it possible to create chatbots with custom knowledge and instructions. This is what you will find here. --> Duplicate this space to create your own Claude-powered assistant with custom knowledge and instructions. Steps = - Create a HuggingFace account if you do not have one - Set your [Anthropic](https://console.anthropic.com/dashboard) API key as a secret - Set desired username and password as secrets - Upload the desired knowledge base / reference document for the assistant under "Files" - Copy the path where indicated in app.py - Change the custom instructions to fit your use case - Change UI elements as needed Important = - This set-up uses a very simple retrieval strategy. Advanced used should consider using [Voyage AI](https://docs.anthropic.com/en/docs/build-with-claude/embeddings) as recommended by Anthropic - It does not have a vector store, and can only handle a single, small document (e.g., one-page rubric) - It also does not have internet access - You have the option to use Claude 3.5 Sonnet or the much cheaper Claude 3 Haiku (see pricing [here](https://www.anthropic.com/pricing#anthropic-api))