|
Download docs/walkthrough.md from YGCXLab/ux-research-agent-slackbot: direct link, hf CLI and curl.
- Browser
- Download file 5.12 kB
-
https://huggingface.co/spaces/YGCXLab/ux-research-agent-slackbot/resolve/main/docs/walkthrough.md
- Command line
-
hf download hf://spaces/YGCXLab/ux-research-agent-slackbot/docs/walkthrough.md
-
curl -L -o walkthrough.md https://huggingface.co/spaces/YGCXLab/ux-research-agent-slackbot/resolve/main/docs/walkthrough.md
5.12 kB
| # UX/Research Chatbot PoC Walkthrough | |
| This document outlines how to set up and run the Proof of Concept (PoC) for the UX/Research Chatbot. This agent searches internal research reports and Baymard guidelines using metadata filtering and LLM generation. | |
| ## Features | |
| - **Multimodal (Image/Video) Analysis**: Analyze UI designs for usability issues or search for similar references using uploaded files. | |
| - **Unified Search**: Searches both `research_report.json` and `baymard_unified_database_v2.json`. | |
| - **Agentic Retriever (RAG)**: LLM์ด ์ง์ Fuzzy ๊ฒ์โ๋ฌธ์ ์ฝ๊ธฐโํ๋จ ๋ฃจํ๋ฅผ ์คํํ๋ ์์ด์ ํธ ๊ธฐ๋ฐ ๊ฒ์. | |
| - **Source Routing**: detect intent (e.g., "์ฌ๋ด ๋ฆฌ์์น๋ง", "๋ฒ ์ด๋ง๋๋ง") to filter data sources. | |
| - **Context Awareness**: Remembers previous conversation turns to handle follow-up questions (e.g., "๊ทธ ์ค์์ ์ฌ๋ด ๋ฆฌ์์น๋ง ๋ณด์ฌ์ค"). | |
| - **Smart Filtering**: Extracts keywords from natural language queries to filter documents before generation. | |
| - **LLM**: Powered by Google Gemini 3 Flash (`gemini-3-flash-preview`). | |
| ## Setup | |
| ### 1. Prerequisites | |
| - Python 3.8+ | |
| - Google API Key | |
| ### 2. Installation | |
| 1. Navigate to the project directory: | |
| ```bash | |
| cd /Users/johan/.gemini/antigravity/brain/e4e4053f-3b95-42ed-b913-7720b36a4303 | |
| ``` | |
| 2. Install dependencies (if not already done): | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 3. Set up API Key: | |
| - Ensure `.env` file exists and contains `GOOGLE_API_KEY=your_key_here`. | |
| ## Deployment | |
| The project is deployed on Hugging Face Spaces as two separate services: | |
| ### 1. Web Application (Streamlit) | |
| * **URL**: [https://huggingface.co/spaces/YGCXLab/ux-research-agent-poc](https://huggingface.co/spaces/YGCXLab/ux-research-agent-poc) | |
| * **Purpose**: User-friendly web interface for research and file analysis. | |
| * **Deployment**: `python deploy_web.py` | |
| ### 2. Slackbot | |
| * **Space**: [https://huggingface.co/spaces/YGCXLab/ux-research-agent-slackbot](https://huggingface.co/spaces/YGCXLab/ux-research-agent-slackbot) (No UI) | |
| * **Purpose**: Dedicated bot for Slack integration (Socket Mode). | |
| * **Deployment**: `python deploy_slack.py` | |
| ### Slackbot Integration & Deployment (2026-01-14) | |
| - **Separate Deployment**: Deployed Slackbot to a dedicated Hugging Face Space (`ux-research-agent-slackbot`) to ensure stability and independent scaling. | |
| - **Full RAG Support**: | |
| - Implemented `indexer.py` improvements to extract text from **original PDF files** (Baymard) and **Markdown files** (Internal Research). | |
| - Configured server-side indexing: The bot automatically builds a fresh Vector DB from the uploaded `data` folder on startup, ensuring compatibility and data freshness. | |
| - **Multimodal & Interactive**: | |
| - Supports image/video inputs for UX analysis. | |
| - Added emoji reactions (๐ค, โ , โ ๏ธ) for better user feedback during processing. | |
| - Enabled "Socket Mode" for reliable communication without public URL exposure. | |
| ## Web Interface (Streamlit) Local Run | |
| To run the web app locally: | |
| ```bash | |
| venv/bin/streamlit run app.py | |
| ``` | |
| This will open a browser window at `http://localhost:8501`. | |
| - Enter your question in the chat input. | |
| - Clear chat history using the button in the sidebar. | |
| ## Usage Examples | |
| ### Scenario 1: General Research | |
| Ask for materials across all sources. | |
| > **User**: "๋ฆฌ๋ทฐ ๊ด๋ จ ์๋ฃ ์ฐพ์์ค" | |
| > | |
| > **Bot**: | |
| > - [Internal Research] [IDI] ๋ฆฌ๋ทฐ ํ์ ๊ฒฝํ ๊ฐ์ ์ ํ... | |
| > - [Baymard Guideline] Allow Users to Sort Reviews #837... | |
| > | |
| > (Summary and links are provided for both sources) | |
| ### Scenario 2: Source-Specific Search | |
| Ask specifically for internal or external data. | |
| > **User**: "๋ฆฌ๋ทฐ ๊ด๋ จ **์ฌ๋ด๋ฆฌ์์น** ๋ด์ฉ ์ฐพ์์ค" | |
| > | |
| > **Bot**: | |
| > - [Internal Research] [IDI] ๋ฆฌ๋ทฐ ํ์ ๊ฒฝํ ๊ฐ์ ์ ํ... | |
| > - [Internal Research] ์ถ์ฒ ์ด๋์ ํฐ๋ธ... | |
| > | |
| > (Only internal research items are returned) | |
| ### Scenario 3: Context-Aware Follow-up | |
| Refine your search using previous context. | |
| > **User**: "๋ฆฌ๋ทฐ ๊ด๋ จ ์๋ฃ ์ฐพ์์ค" | |
| > **Bot**: (Returns mixed results) | |
| > **User**: "**๊ทธ ์ค์์** ์ฌ๋ด ๋ฆฌ์์น๋ง ๋ณด์ฌ์ค" | |
| > **Bot**: (Filters previous topic for internal research only) | |
| ### Scenario 4: Design Critique (Multimodal) | |
| Get feedback on a UI design. | |
| > **Input**: (Uploads screenshot of a checkout page) | |
| > **User**: "์ด ํ๋ฉด์ ๋ฌธ์ ์ ์ด ๋ญ์ผ?" | |
| > **Bot**: | |
| > "ํด๋น ํ๋ฉด์์ ๋ค์๊ณผ ๊ฐ์ UX ๋ฌธ์ ์ ์ด ๋ฐ๊ฒฌ๋ฉ๋๋ค: | |
| > 1. '๊ฒฐ์ ํ๊ธฐ' ๋ฒํผ์ด ์คํฌ๋กค ์๋์ ์์ด ๋ฐ๊ฒฌํ๊ธฐ ์ด๋ ต์ต๋๋ค (Baymard Guideline #124 ์ฐธ์กฐ). | |
| > 2. ..." | |
| ### Scenario 5: Visual Reference Search (Multimodal) | |
| Find guidelines relevant to a specific UI pattern. | |
| > **Input**: (Uploads screenshot of a date picker) | |
| > **User**: "์ด๋ฐ UI์ ๊ด๋ จ๋ ๊ฐ์ด๋๋ผ์ธ ์ฐพ์์ค" | |
| > **Bot**: | |
| > "์ด๋ฏธ์ง์์ 'Date Picker', 'Calendar' ์์๊ฐ ์๋ณ๋์์ต๋๋ค. ๊ด๋ จ ๊ฐ์ด๋๋ผ์ธ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค: | |
| > - [Baymard] Date Picker Design Best Practices..." | |
| - `search_engine.py`: Main entry point and logic (CLI, LLM Chain). | |
| - `requirements.txt`: Python package dependencies. | |