WithPet is a chatbot that helps users find pet-friendly facilities with ease. It provides a comprehensive database of locations where pets are allowed, enabling users to search for places based on location, category, operating hours, parking availability, and pet-related amenities.
- Search for pet-friendly facilities by location (city, district).
- Filter by category (e.g., cafes, restaurants, pet hospitals, etc.).
- Check operating hours, including weekends and holidays.
- Identify whether parking is available.
- Get details about pet size restrictions, additional pet charges, and indoor/outdoor pet access.
- Retrieve contact details including phone number and website.
- Frontend: Streamlit
- Backend: Python, LangChain, LangGraph
- LLM: OpenAI GPT-4o (API)
- Database: FAISS/Pinecone (Vector Store), SQLite (In-memory)
- Clone the repository:
git clone https://github.com/PrompTartLab/WithPet.git
- Install dependencies:
pip install -r requirements.txt
- Configure Streamlit Secrets (secrets.toml):
PROJECT_DIR="{project_dir}" CONNECTED_DIR="{connected_dir}" OPENAI_API_KEY="{openai_api_key}" LANGSMITH_API_KEY="{langsmith_api_key}" PINECONE_API_KEY="{pinecone_api_key}" PINECONE_INDEX_NAME="{pinecone_index_name}"
- project_dir: Full path to the project directory (e.g., /home/ubuntu/WithPet).
- connected_dir: Directory for data and FAISS storage (e.g., /home/ubuntu/WithPet).
- Start the application:
streamlit run home.py
- Simply type your query in the chatbot’s text input box.
Example: "Find a pet-friendly pension in Incheon without additional pet fees."
- All results automatically include pet-friendly places, so you don’t need to specify “pet-friendly” in your query.
- Select Region / Type / Options from the left sidebar and click 검색하기 button to auto-generate a question.
- Currently, only metropolitan cities (특별시, 광역시) are selectable in the sidebar.
- For more detailed queries, type them directly into the chatbot!
✅ LangGraph-based Workflow
- Uses LangGraph to interpret user queries and execute appropriate search processes.
✅ Text-to-SQL Approach
- Traditional RAG-based methods rely on vector embedding for similarity searches. However, since this project uses boolean and categorical columns, the RAG approach was not optimal.
- Instead, the LLM dynamically generates SQL queries to filter results.
Example Query: "Recommend a pet-friendly café in Seoul with parking."
→ The system retrieves locations where
city = 'Seoul'andparking_available = 'Y'.
✅ Few-shot Learning for SQL Generation
- To improve SQL generation accuracy, predefined question-SQL pairs are embedded in a vector store.
- The model retrieves similar examples for reference when generating queries.
✅ Error Handling
- The chatbot ignores queries unrelated to pet-friendly places to maintain relevance.
This project utilizes the "Pet-Friendly Cultural Facility Location Data" provided by the 한국문화정보원(KCISA) through the Culture Big Data Platform under the Open License Type 1. The original dataset is freely available at Culture Big Data Platform.
For any inquiries or issues, please reach out to jiyoon0424@gmail.com or open an issue on GitHub.

