From my understanding, the oracle function in Grover's algorithm is used as a way to check for the desired outcome. 

I have looked at [this](https://github.com/Qiskit/qiskit-community-tutorials/blob/2a5559bbd1b98fee7cf316bfd2fa86e427a4ef5d/algorithms/grover_algorithm.ipynb) example which implements the Exactly-1 3-SAT problem and the oracle function follows some rules which only returns True for the correct solution. I have also looked at [this](https://community.qiskit.org/textbook/ch3/3.6.html) which looks for two marked states. 

In the second example it looks like the exact solution is given to the oracle which I don't understand as I thought we are supposed to be searching for the solution.

I was wondering if I am misinterpreting this and also how an oracle function can be created if we don't know the rules (like a maze)?