FAIR-Perplexica is an open-source AI-powered searching tool on topics related to Research Data Management. It is based on Perplexica and metasearch-engine SearxNG.
- Local LLMs: You can make use local LLMs such as Llama3 and Mixtral using Ollama.
- Two Main Modes:
- Copilot Mode: (In development) Boosts search by generating different queries to find more relevant internet sources. Like normal search instead of just using the context by SearxNG, it visits the top matches and tries to find relevant sources to the user's query directly from the page.
- Normal Mode: Processes your query and performs a web search.
- Focus Modes: Special modes to better answer specific types of questions. Perplexica currently has 6 focus modes:
- All Mode: Searches the entire web to find the best results.
- Writing Assistant Mode: Helpful for writing tasks that does not require searching the web.
- Academic Search Mode: Finds articles and papers, ideal for academic research.
- YouTube Search Mode: Finds YouTube videos based on the search query.
- Wolfram Alpha Search Mode: Answers queries that need calculations or data analysis using Wolfram Alpha.
- Reddit Search Mode: Searches Reddit for discussions and opinions related to the query.
- Current Information: Some search tools might give you outdated info because they use data from crawling bots and convert them into embeddings and store them in a index. Unlike them, Perplexica uses SearxNG, a metasearch engine to get the results and rerank and get the most relevant source out of it, ensuring you always get the latest information without the overhead of daily data updates.
It has many more features like image and video search. Some of the planned features are mentioned in upcoming features.
There are mainly 2 ways of installing FAIR-Perplexica - With Docker, Without Docker. Using Docker is highly recommended.
-
Ensure Docker is installed and running on your system.
-
Clone the FAIR-Perplexica repository:
git clone https://github.com/UB-Mannheim/FAIR-Perplexica.git
-
After cloning, navigate to the directory containing the project files.
-
Rename the
sample.config.toml
file toconfig.toml
. For Docker setups, you need only fill in the following fields:-
OPENAI
: Your OpenAI API key. You only need to fill this if you wish to use OpenAI's models. -
OLLAMA
: Your Ollama API URL. You should enter it ashttp://host.docker.internal:PORT_NUMBER
. If you installed Ollama on port 11434, usehttp://host.docker.internal:11434
. For other ports, adjust accordingly. You need to fill this if you wish to use Ollama's models instead of OpenAI's. -
GROQ
: Your Groq API key. You only need to fill this if you wish to use Groq's hosted models. -
ANTHROPIC
: Your Anthropic API key. You only need to fill this if you wish to use Anthropic models.Note: You can change these after starting Perplexica from the settings dialog.
-
SIMILARITY_MEASURE
: The similarity measure to use (This is filled by default; you can leave it as is if you are unsure about it.)
-
-
Ensure you are in the directory containing the
docker-compose.yaml
file and execute:docker compose up -d
-
Wait a few minutes for the setup to complete. You can access Perplexica at http://localhost:3000 in your web browser.
Note: After the containers are built, you can start Perplexica directly from Docker without having to open a terminal.
- Install SearXNG and allow
JSON
format in the SearXNG settings. - Clone the repository and rename the
sample.config.toml
file toconfig.toml
in the root directory. Ensure you complete all required fields in this file. - Rename the
.env.example
file to.env
in theui
folder and fill in all necessary fields. - After populating the configuration and environment files, run
npm i
in both theui
folder and the root directory. - Install the dependencies and then execute
npm run build
in both theui
folder and the root directory. - Finally, start both the frontend and the backend by running
npm run start
in both theui
folder and the root directory.
Note: Using Docker is recommended as it simplifies the setup process, especially for managing environment variables and dependencies.
See the installation documentation for more information like exposing it your network, etc.
If you're encountering an Ollama connection error, it is likely due to the backend being unable to connect to Ollama's API. To fix this issue you can:
-
Check your Ollama API URL: Ensure that the API URL is correctly set in the settings menu.
-
Update API URL Based on OS:
- Windows: Use
http://host.docker.internal:11434
- Mac: Use
http://host.docker.internal:11434
- Linux: Use
http://<private_ip_of_host>:11434
Adjust the port number if you're using a different one.
- Windows: Use
-
Linux Users - Expose Ollama to Network:
-
Inside
/etc/systemd/system/ollama.service
, you need to addEnvironment="OLLAMA_HOST=0.0.0.0"
. Then restart Ollama bysystemctl restart ollama
. For more information see Ollama docs -
Ensure that the port (default is 11434) is not blocked by your firewall.
-
If you wish to use FAIR-Perplexica as an alternative to traditional search engines like Google or Bing, or if you want to add a shortcut for quick access from your browser's search bar, follow these steps:
- Open your browser's settings.
- Navigate to the 'Search Engines' section.
- Add a new site search with the following URL:
http://localhost:3000/?q=%s
. Replacelocalhost
with your IP address or domain name, and3000
with the port number if Perplexica is not hosted locally. - Click the add button. Now, you can use FAIR-Perplexica directly from your browser's search bar.