Welcome to PolicyBuddy Research Plan Generator v0.1, an experimental tool designed to support policy analysts, sustainability consultants, due diligence experts, and anyone involved in policy or sustainability-related-research-oriented projects.
Our goal is to streamline the creation of research plans, facilitate the discovery of relevant documents, and enhance the quality of preliminary reports through advanced search techniques. Whether you're starting a new project or refining your research, PolicyBuddy aims to improve both your process and outcomes.
- Interactive Research Plan Creation: Easily generate a research plan through user input or a predefined prompt.
- Advanced Document Search: Conduct detailed searches to find documents and reports relevant to your research.
- Enhanced Report Production: Incorporate insights from targeted document searches to improve preliminary reports.
- PDF Discovery and Analysis: Search for, retrieve, and analyze PDF documents pertinent to your research topic.
- Vector Store Compatibility: Leverage FAISS vector stores for efficient document embedding and retrieval.
Ensure Python 3.6 or later is installed on your system. Install the required Python packages using:
pip install -r requirements.txt
This command installs all necessary dependencies, including libraries for argument parsing, JSON manipulation, and interfacing with external search and embedding services.
To fully utilize PolicyBuddy's features, you'll need API keys for OpenAI, Perplexity, and SERP, enabling advanced functionalities like AI-driven text generation, document analysis, and search engine results processing.
- Visit OpenAI API.
- Sign up or log in to create an API account.
- Navigate to the API keys section and generate a new API key.
- Copy your
OPENAI_API_KEY
.
- Go to Perplexity AI and sign up.
- Find the API documentation or dashboard to generate an API key.
- Copy your
PERPLEXITY_API_KEY
.
- Visit SERP API and sign up.
- Generate a new API key from the dashboard or API section.
- Copy your
SERPER_API_KEY
.
After obtaining the API keys, configure them in your environment to allow secure access to the necessary services.
For Unix/Linux/macOS:
export OPENAI_API_KEY='your_openai_api_key_here'
export PERPLEXITY_API_KEY='your_perplexity_api_key_here'
export SERPER_API_KEY='your_serper_api_key_here'
For Windows (using Command Prompt):
set OPENAI_API_KEY=your_openai_api_key_here
set PERPLEXITY_API_KEY=your_perplexity_api_key_here
set SERPER_API_KEY=your_serper_api_key_here
Replace the placeholders with the actual keys you obtained.
Keep your API keys secure and do not share them publicly. Regenerate them immediately if you suspect they've been compromised.
PolicyBuddy can be used in various modes to suit your project needs. Here's how to get started:
python policybuddy.py [options]
-f
,--file
: Optional JSON file containing user context.-s
,--search_results
: Optional JSON file with search results.-r
,--research_plan
: Optional JSON file with the final research plan.-p
,--prompt
: Optional .txt file with the system prompt.-pr
,--preliminary_report
: Optional JSON with the preliminary report.-pdfs
,--pdf_destination_folder
: Optional folder for storing PDFs.-v
,--vector_store
: Optional location of the FAISS vector store for PDF embeddings.-er
,--enhanced_report
: Optional location of the enhanced report JSON.
To start generating a research plan with interactive prompts:
python policybuddy.py
To use a predefined user context and prompt file:
python policybuddy.py -f user_context.json -p system_prompt.txt
As an evolving experimental tool, we recognize the risk of AI bias, especially in the sustainability sector and APAC regions. We are committed to reducing this bias and improving our tool's inclusivity and accuracy. Users should critically evaluate results and consider diverse sources, particularly when addressing sustainability issues in APAC regions.
We greatly value community feedback and contributions. If you have suggestions for reducing bias, enhancing functionality, or contributing code, please share your input through issues or pull requests.
PolicyBuddy is released under the MIT License. For more details, see the LICENSE file.
We hope PolicyBuddy v0.1 enhances your research process, helping you generate insightful and impactful policy research.
Happy Researching!